Workspace

Show Deprecated
Not Creatable
Service

The core job of Workspace is to hold objects that exist in the 3D world, effectively BaseParts and Attachments. While such objects are descendant of Workspace, they will be active. For BaseParts, this means they will be rendered, and physically interact with other parts and the world. For Attachments, this means that objects adorned to them, such as ParticleEmitters, Beams, and BillboardGuis, will render.

Understanding this behavior is important, as it means objects can be removed from Workspace when they are not needed. For example, map Models can be removed when a different map is being played on. Objects that are not immediately needed in the 3D world are generally stored in ReplicatedStorage or ServerStorage.

In its role as the holder of active 3D objects, Workspace includes a number of useful functions related to parts, their positions, and joints between them.

Accessing the Workspace

Workspace can be accessed several ways, all of which are valid.

  • workspace
  • game:GetService("Workspace")
  • game.Workspace
Notes

Summary

Properties

Properties inherited from Model

Properties

Properties inherited from PVInstance

Properties

Methods

Methods inherited from WorldRoot

Methods

Methods inherited from Model

Methods

Methods inherited from PVInstance

Methods

Events

Properties

AirDensity

Read Parallel

AllowThirdPartySales

Not Replicated
Read Parallel

AuthorityMode

Not Scriptable
Read Parallel

AvatarUnificationMode

Not Scriptable
Read Parallel

ClientAnimatorThrottling

Read Parallel

CurrentCamera

Not Replicated
Read Parallel

DistributedGameTime

Not Replicated
Read Parallel

FallHeightEnabled

Plugin Security
Read Parallel

FallenPartsDestroyHeight

Plugin Security
Read Parallel

FluidForces

Not Scriptable
Read Parallel

GlobalWind

Read Parallel

Gravity

Read Parallel

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)

IKControlConstraintSupport

Not Scriptable
Read Parallel

InsertPoint

Not Replicated
Read Parallel

LuauTypeCheckMode

Plugin Security
Read Parallel

MeshPartHeadsAndAccessories

Not Scriptable
Read Parallel

ModelStreamingBehavior

Not Scriptable
Read Parallel

MoverConstraintRootBehavior

Not Scriptable
Read Parallel

PathfindingUseImprovedSearch

Not Scriptable
Read Parallel

PhysicsImprovedSleep

Not Scriptable
Read Parallel

PhysicsSteppingMethod

Not Scriptable
Read Parallel

PlayerCharacterDestroyBehavior

Not Scriptable
Read Parallel

PrimalPhysicsSolver

Not Scriptable
Read Parallel

RejectCharacterDeletions

Not Scriptable
Read Parallel

RenderingCacheOptimizations

Not Scriptable
Read Parallel

ReplicateInstanceDestroySetting

Not Scriptable
Read Parallel
Read Parallel

SandboxedInstanceMode

Not Scriptable
Read Parallel

SignalBehavior

Not Scriptable
Read Parallel

StreamOutBehavior

Not Scriptable
Read Parallel

StreamingEnabled

Plugin Security
Read Parallel

StreamingIntegrityMode

Not Scriptable
Read Parallel

StreamingMinRadius

Not Scriptable
Read Parallel

StreamingTargetRadius

Not Scriptable
Read Parallel

Terrain

Read Only
Not Replicated
Read Parallel

TouchEventsUseCollisionGroups

Not Scriptable
Read Parallel

TouchesUseCollisionGroups

Not Scriptable
Read Parallel

UseImprovedModelLod

Not Scriptable
Read Parallel

UseNewLuauTypeSolver

Not Scriptable
Read Parallel

Methods

GetNumAwakeParts

Write Parallel

Returns

GetPhysicsThrottling

Write Parallel

Returns

GetRealPhysicsFPS

Write Parallel

Returns

Code Samples

Workspace:GetRealPhysicsFPS

local Players = game:GetService("Players")
local player = Players.LocalPlayer
while task.wait(1) do
if workspace:GetRealPhysicsFPS() > 65 then
player:Kick()
end
end

GetServerTimeNow

Write Parallel

Returns

JoinToOutsiders

()

Parameters

objects: Instances

Returns

()

PGSIsEnabled


Returns

UnjoinFromOutsiders

()

Parameters

objects: Instances

Returns

()

ZoomToExtents

()
Plugin Security

Returns

()

Events

PersistentLoaded

Parameters

player: Player