The Workspace class represents the physical area in which a game mostly takes place. It has no actual physical boundaries, but there are technical boundaries, as heading too far away from the origin (0, 0, 0) will cause floating-point inaccuracies to occur, and rendering will get shaky. Heading too far away will not render anything at all, and players at this distance will be left with a black screen. The Workspace is mostly used for housing the environment of a game. Other objects that may appear later may be stored in ServerStorage or ReplicatedStorage, the latter of which being used for server-only storage. All the visible BaseParts in a game must be placed in the Workspace in order for players to see and interact with them. Scripts, while usually put in ServerScriptService, will also run if they are placed in the Workspace. The Workspace class inherits from WorldRoot.
Properties
AirDensity: float
- Category: AirProperties.
- Serialization: can save and load.
- Thread safety: read safe
AllowThirdPartySales: bool
When enabled, assets created by other users can be purchased in-game using MarketplaceService. This property does not impact developer products, which can only be sold in the experience they were created under.
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
AvatarUnificationMode: AvatarUnificationMode
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
ClientAnimatorThrottling: ClientAnimatorThrottlingMode
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
CurrentCamera: Camera
On the client, this property's value is the Camera object currently tied to the local Player. This property can be set to another Camera, which will also delete any other Cameras present in the Workspace on the client. When set to nil
, all Cameras present in the Workspace are deleted and a new one is created and set as the new CurrentCamera, but this can have unexpected consequences.
This value will always be nil on the server. As a result, a LocalScript (or a ModuleScript running on the client) must be used to reference it.
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
DistributedGameTime: double
- Category: Data.
- Serialization: can save and load.
- Thread safety: read safe
EditorLiveScripting: EditorLiveScripting
Indicates whether or not live scripting is enabled in studio. Enabling live scripting allows multiple people to edit one script simultaneously, with their changes shown to other editors in real time.
- Category: Scripting.
- Serialization: can save and load.
- Thread safety: read safe
FallenPartsDestroyHeight: float
This property determines at what vertical height, or Y-coordinate, any BasePart is parented to nil
. If a removed part is the last part in a Model, the Model is also removed. The value of this property is clamped between -50,000 and 50,000 studs.
- Category: Behavior.
- Write security: PluginSecurity.
- Serialization: can save and load.
- Thread safety: read safe
FilteringEnabled: bool
This property previously toggled replication filtering for an experience, but no longer has any effect because replication filtering is forced on in all experiences.
- Category: Behavior.
- Write security: PluginSecurity.
- Serialization: cannot load or save.
- Thread safety: read safe
FluidForces: FluidForces
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
GlobalWind: Vector3
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
Gravity: float
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
IKControlConstraintSupport: IKControlConstraintSupport
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
InterpolationThrottling: InterpolationThrottlingMode
- Category: Behavior.
- Write security: PluginSecurity.
- Serialization: can save and load.
- Thread safety: read safe
MeshPartHeadsAndAccessories: MeshPartHeadsAndAccessories
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
ModelStreamingBehavior: ModelStreamingBehavior
- Category: Streaming.
- Serialization: can save and load.
- Thread safety: read safe
PhysicsSteppingMethod: PhysicsSteppingMethod
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
PlayerCharacterDestroyBehavior: PlayerCharacterDestroyBehavior
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
PrimalPhysicsSolver: PrimalPhysicsSolver
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
RejectCharacterDeletions: RejectCharacterDeletions
- Category: Networking.
- Serialization: can save and load.
- Thread safety: read safe
ReplicateInstanceDestroySetting: ReplicateInstanceDestroySetting
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
Retargeting: AnimatorRetargetingMode
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
SignalBehavior: SignalBehavior
- Category: Behavior.
- Serialization: cannot load or save.
- Thread safety: read safe
StreamOutBehavior: StreamOutBehavior
- Category: Streaming.
- Serialization: can save and load.
- Thread safety: read safe
StreamingEnabled: bool
- Category: Streaming.
- Write security: PluginSecurity.
- Serialization: can save and load.
- Thread safety: read safe
StreamingIntegrityMode: StreamingIntegrityMode
- Category: Streaming.
- Serialization: can save and load.
- Thread safety: read safe
StreamingMinRadius: int
- Category: Streaming.
- Serialization: can save and load.
- Thread safety: read safe
StreamingTargetRadius: int
- Category: Streaming.
- Serialization: can save and load.
- Thread safety: read safe
Terrain: Terrain
This property is the Terrain object that is currently parented to the Workspace.
- Category: Behavior.
- Serialization: cannot load or save.
- Thread safety: read safe
TouchesUseCollisionGroups: bool
- Category: Behavior.
- Serialization: can save and load.
- Thread safety: read safe
Methods
BreakJoints(objects: Objects): null
Name | Type |
---|---|
objects | Objects |
- Security: PluginSecurity.
- Thread safety: unsafe
CalculateJumpDistance(gravity: float, jumpPower: float, walkSpeed: float): float
Name | Type |
---|---|
gravity | float |
jumpPower | float |
walkSpeed | float |
- Security: RobloxScriptSecurity.
- Thread safety: unsafe
CalculateJumpHeight(gravity: float, jumpPower: float): float
Name | Type |
---|---|
gravity | float |
jumpPower | float |
- Security: RobloxScriptSecurity.
- Thread safety: unsafe
CalculateJumpPower(gravity: float, jumpHeight: float): float
Name | Type |
---|---|
gravity | float |
jumpHeight | float |
- Security: RobloxScriptSecurity.
- Thread safety: unsafe
ExperimentalSolverIsEnabled(): bool
- Security: LocalUserSecurity.
- Thread safety: unsafe
GetNumAwakeParts(): int
- Thread safety: safe
GetPhysicsThrottling(): int
- Thread safety: safe
GetRealPhysicsFPS(): double
- Thread safety: safe
GetServerTimeNow(): double
- Thread safety: safe
JoinToOutsiders(objects: Objects, jointType: JointCreationMode): null
Name | Type |
---|---|
objects | Objects |
jointType | JointCreationMode |
- Thread safety: unsafe
MakeJoints(objects: Objects): null
Name | Type |
---|---|
objects | Objects |
- Security: PluginSecurity.
- Thread safety: unsafe
PGSIsEnabled(): bool
- Thread safety: unsafe
SetAvatarUnificationMode(value: AvatarUnificationMode): null
- Security: RobloxScriptSecurity.
- Thread safety: unsafe
SetMeshPartHeadsAndAccessories(value: MeshPartHeadsAndAccessories): null
Name | Type |
---|---|
value | MeshPartHeadsAndAccessories |
- Security: RobloxScriptSecurity.
- Thread safety: unsafe
SetPhysicsThrottleEnabled(value: bool): null
Name | Type |
---|---|
value | bool |
- Security: LocalUserSecurity.
- Thread safety: unsafe
ZoomToExtents(): null
- Security: PluginSecurity.
- Thread safety: unsafe
Events
PersistentLoaded(player: Player)
Name | Type | Description |
---|---|---|
player | Player | The Player who was received all persistent models. |
This event is fired when all persistent models or atomic models without any BaseParts have been sent to a player.
- Thread safety: unsafe
Removed members
Methods
Properties
Events
External links[]
- Workspace in the Roblox Creator Documentation
- Workspace in the Roblox API Reference