概要
屬性
方法
BreakJoints(objects: Instances):() |
JoinToOutsiders(objects: Instances,jointType: Enum.JointCreationMode):() |
MakeJoints(objects: Instances):() |
UnjoinFromOutsiders(objects: Instances):() |
ZoomToExtents():() |
活動
PersistentLoaded(player: Player):RBXScriptSignal |
API 參考
屬性
FilteringEnabled
Gravity
範例程式碼
低重力按鈕
local MOON_GRAVITY_RATIO = 1.62 / 9.81
local DEFAULT_GRAVITY = 196.2
local\
MOON_GRAVITY = DEFAULT_GRAVITY * MOON_GRAVITY_RATIO
-- 創建一個觸摸板
\ local pad = Instance.new("Part")
pad.Size = Vector3.new(5, 1, 5)
pad.Position\
= Vector3.new(0, 0.5, 0)
pad.Anchored = true
pad.BrickColor = BrickColor.new("亮綠色")
pad.Parent = workspace
-- 監聽觸摸板的觸摸事件
local enabled\
= false
local debounce = false
local function onPadTouched(_hit)
if not\
debounce then
debounce = true
enabled = not enabled
workspace.Gravity\
= enabled and MOON_GRAVITY or DEFAULT_GRAVITY
pad.BrickColor = enabled\
and BrickColor.new("亮紅色") or BrickColor.new("亮綠色")
\ ttask.wait(1)
debounce = false
end
end
pad.Touched:Connect(onPadTouched)InterpolationThrottling
PathfindingUseImprovedSearch
PlayerCharacterDestroyBehavior
PlayerScriptsUseInputActionSystemAlias
RenderingCacheOptimizations
ReplicateInstanceDestroySetting
方法
BreakJoints
GetRealPhysicsFPS
JoinToOutsiders
參數
objects:Instances |
返回
()
MakeJoints
UnjoinFromOutsiders
Workspace:UnjoinFromOutsiders(objects:Instances):()
參數
objects:Instances |
返回
()
ZoomToExtents
Workspace:ZoomToExtents():()
返回
()
活動