Classe motore
Workspace
*Questo contenuto è tradotto usando AI (Beta) e potrebbe contenere errori. Per visualizzare questa pagina in inglese, clicca qui.
Sommario
Proprietà
Metodi
BreakJoints(objects: Instances):() |
JoinToOutsiders(objects: Instances,jointType: Enum.JointCreationMode):() |
MakeJoints(objects: Instances):() |
UnjoinFromOutsiders(objects: Instances):() |
ZoomToExtents():() |
Eventi
PersistentLoaded(player: Player):RBXScriptSignal |
Membri ereditati
Membri ereditati da WorldRoot: 21
Membri ereditati da Model: 26
Membri ereditati da PVInstance: 4
Membri ereditati da Instance: 57
Membri ereditati da Object: 6
Riferimento API
Proprietà
FilteringEnabled
Gravity
Campioni di codice
Pulsante di Bassa Gravità
local MOON_GRAVITY_RATIO = 1.62 / 9.81
local DEFAULT_GRAVITY = 196.2
local MOON_GRAVITY = DEFAULT_GRAVITY * MOON_GRAVITY_RATIO
-- Crea un pad tattile
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("Verde brillante")
pad.Parent = workspace
-- Ascolta il tocco del pad
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("Rosso brillante") or BrickColor.new("Verde brillante")
task.wait(1)
debounce = false
end
end
pad.Touched:Connect(onPadTouched)InterpolationThrottling
PathfindingUseImprovedSearch
PlayerCharacterDestroyBehavior
PlayerScriptsUseInputActionSystemAlias
RenderingCacheOptimizations
ReplicateInstanceDestroySetting
Metodi
BreakJoints
GetRealPhysicsFPS
Restituzioni
Campioni di codice
Workspace:GetRealPhysicsFPS
local Players = game:GetService("Players")
local player = Players.LocalPlayer
while task.wait(1) do
-- Se l'FPS fisico reale è superiore a 65, espelli il giocatore
if workspace:GetRealPhysicsFPS() > 65 then
player:Kick()
end
endJoinToOutsiders
Parametri
objects:Instances |
Restituzioni
()
MakeJoints
UnjoinFromOutsiders
Workspace:UnjoinFromOutsiders(objects:Instances):()
Parametri
objects:Instances |
Restituzioni
()
ZoomToExtents
Workspace:ZoomToExtents():()
Restituzioni
()
Eventi