Workspace
Summary
Properties
Methods
BreakJoints(objects: Instances):() |
JoinToOutsiders(objects: Instances,jointType: Enum.JointCreationMode):() |
MakeJoints(objects: Instances):() |
UnjoinFromOutsiders(objects: Instances):() |
ZoomToExtents():() |
Events
PersistentLoaded(player: Player):RBXScriptSignal |
Inherited Members
29 inherited from WorldRoot
26 inherited from Model
4 inherited from PVInstance
58 inherited from Instance
6 inherited from Object
API Reference
Properties
Distributed Game Time
Code Samples
Distributed Game Time
local Workspace = game:GetService("Workspace")
print(Workspace.DistributedGameTime) -- Time the game started running
print(os.time()) -- Time since epoch (1 January 1970, 00:00:00) UTC
print(tick()) -- Time since epoch (1 January 1970, 00:00:00) system time
print(time()) -- Time the game started running
print(elapsedTime()) -- Time since Roblox started runningFiltering Enabled
Gravity
Code Samples
Low Gravity Button
local MOON_GRAVITY_RATIO = 1.62 / 9.81
local DEFAULT_GRAVITY = 196.2
local MOON_GRAVITY = DEFAULT_GRAVITY * MOON_GRAVITY_RATIO
-- Create a touch pad
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("Bright green")
pad.Parent = workspace
-- Listen for pad touch
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("Bright red") or BrickColor.new("Bright green")
task.wait(1)
debounce = false
end
end
pad.Touched:Connect(onPadTouched)Interpolation Throttling
Pathfinding Use Improved Search
Player Character Destroy Behavior
Player Scripts Use Input Action System Alias
Rendering Cache Optimizations
Methods
Apply Recommended Streaming Settings
Break Joints
Get Real Physics FPS
Join To Outsiders
Parameters
objects:Instances |
Returns
()
Make Joints
Unjoin From Outsiders
Workspace: Unjoin From Outsiders(objects:Instances):()
Parameters
objects:Instances |
Returns
()
Zoom To Extents
Workspace: Zoom To Extents():()
Returns
()
Events