Reference API Roblox

Engine API

Website

Related

Reference API Roblox

Workspace

Workspace houses 3D objects which are rendered to the 3D world. Objects not descending from it will not be rendered or physically interact with the world.

This class is not creatable. Instances of this class cannot be created with Instance.new.
This class is a service. It is a singleton that may be acquired with GetService.
Tags: [NotCreatable, Service]

Member index 61

HistoryMember
581AirDensity: float
553AllowThirdPartySales: bool
572AvatarUnificationMode: AvatarUnificationMode
615CSGAsyncDynamicCollision: CSGAsyncDynamicCollision
553ClientAnimatorThrottling: ClientAnimatorThrottlingMode
553CurrentCamera: Camera
553DistributedGameTime: double
553FallenPartsDestroyHeight: float
587FluidForces: FluidForces
553GlobalWind: Vector3
553Gravity: float
581IKControlConstraintSupport: IKControlConstraintSupport
620InsertPoint: Vector3
553MeshPartHeadsAndAccessories: MeshPartHeadsAndAccessories
580ModelStreamingBehavior: ModelStreamingBehavior
628MoverConstraintRootBehavior: MoverConstraintRootBehaviorMode
652PathfindingUseImprovedSearch: PathfindingUseImprovedSearch
553PhysicsSteppingMethod: PhysicsSteppingMethod
603PlayerCharacterDestroyBehavior: PlayerCharacterDestroyBehavior
600PrimalPhysicsSolver: PrimalPhysicsSolver
557RejectCharacterDeletions: RejectCharacterDeletions
624RenderingCacheOptimizations: RenderingCacheOptimizationMode
553ReplicateInstanceDestroySetting: ReplicateInstanceDestroySetting
553Retargeting: AnimatorRetargetingMode
648SandboxedInstanceMode: SandboxedInstanceMode
570SignalBehavior: SignalBehavior
553StreamOutBehavior: StreamOutBehavior
553StreamingEnabled: bool
553StreamingIntegrityMode: StreamingIntegrityMode
553StreamingMinRadius: int
553StreamingTargetRadius: int
553Terrain: Terrain
650TouchEventsUseCollisionGroups: RolloutState
553TouchesUseCollisionGroups: bool
648BreakJoints(objects: Instances): null
462CalculateJumpDistance(gravity: float, jumpPower: float, walkSpeed: float): float
462CalculateJumpHeight(gravity: float, jumpPower: float): float
462CalculateJumpPower(gravity: float, jumpHeight: float): float
462ExperimentalSolverIsEnabled(): bool
566GetNumAwakeParts(): int
566GetPhysicsThrottling(): int
538GetRealPhysicsFPS(): double
566GetServerTimeNow(): double
648JoinToOutsiders(objects: Instances, jointType: JointCreationMode): null
648MakeJoints(objects: Instances): null
462PGSIsEnabled(): bool
603SetAvatarUnificationMode(value: AvatarUnificationMode): null
573SetMeshPartHeadsAndAccessories(value: MeshPartHeadsAndAccessories): null
573SetPhysicsThrottleEnabled(value: bool): null
648UnjoinFromOutsiders(objects: Instances): null
573ZoomToExtents(): null
548PersistentLoaded(player: Player)
inherited from WorldRoot
648ArePartsTouchingOthers(partList: Instances, overlapIgnored: float = 0.000199999995): bool
638Blockcast(cframe: CFrame, size: Vector3, direction: Vector3, params: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
648BulkMoveTo(partList: Instances, cframeList: Array, eventMode: BulkMoveMode = FireAllEvents): null
552CacheCurrentTerrain(id: string, center: Vector3, radius: float): string
552ClearCachedTerrain(id: string): bool
553FindPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
648FindPartOnRayWithIgnoreList(ray: Ray, ignoreDescendantsTable: Instances, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
648FindPartOnRayWithWhitelist(ray: Ray, whitelistDescendantsTable: Instances, ignoreWater: bool = false): Tuple
648FindPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Instances
648FindPartsInRegion3WithIgnoreList(region: Region3, ignoreDescendantsTable: Instances, maxParts: int = 20): Instances
648FindPartsInRegion3WithWhiteList(region: Region3, whitelistDescendantsTable: Instances, maxParts: int = 20): Instances
648GetPartBoundsInBox(cframe: CFrame, size: Vector3, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Instances
648GetPartBoundsInRadius(position: Vector3, radius: float, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Instances
648GetPartsInPart(part: BasePart, overlapParams: OverlapParams = OverlapParams{MaxParts=0, Tolerance=0, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): Instances
573IKMoveTo(part: BasePart, target: CFrame, translateStiffness: float = 0.5, rotateStiffness: float = 0.5, collisionsMode: IKCollisionsMode = OtherMechanismsAnchored): null
553IsRegion3Empty(region: Region3, ignoreDescendentsInstance: Instance = Instance): bool
648IsRegion3EmptyWithIgnoreList(region: Region3, ignoreDescendentsTable: Instances): bool
638Raycast(origin: Vector3, direction: Vector3, raycastParams: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
638RaycastCachedTerrain(id: string, origin: Vector3, direction: Vector3, ignoreWater: bool): RaycastResult?
573SetInsertPoint(point: Vector3, ignoreGrid: bool = false): null
638Shapecast(part: BasePart, direction: Vector3, params: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
638Spherecast(position: Vector3, radius: float, direction: Vector3, params: RaycastParams = RaycastParams{IgnoreWater=false, BruteForceAllSlow=false, RespectCanCollide=false, CollisionGroup=Default, FilterDescendantsInstances={}}): RaycastResult?
648StepPhysics(dt: float, parts: Instances = {}): null
553findPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
648findPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Instances
inherited from Model
553LevelOfDetail: ModelLevelOfDetail
553ModelStreamingMode: ModelStreamingMode
553PrimaryPart: BasePart
562Scale: float
553WorldPivot: CFrame
573AddPersistentPlayer(playerInstance: Player = Player): null
573BreakJoints(): null
607GetBoundingBox(): (CFrame, Vector3)
462GetExtentsSize(): Vector3
553GetModelCFrame(): CFrame
553GetModelSize(): Vector3
648GetPersistentPlayers(): Instances
576GetPrimaryPartCFrame(): CFrame
562GetScale(): float
573MakeJoints(): null
573MoveTo(position: Vector3): null
573RemovePersistentPlayer(playerInstance: Player = Player): null
573ResetOrientationToIdentity(): null
573ScaleTo(newScaleFactor: float): null
573SetIdentityOrientation(): null
573SetPrimaryPartCFrame(cframe: CFrame): null
573TranslateBy(delta: Vector3): null
573breakJoints(): null
573makeJoints(): null
573move(location: Vector3): null
573moveTo(location: Vector3): null
inherited from PVInstance
553Origin: CFrame
553Pivot Offset: CFrame
576GetPivot(): CFrame
573PivotTo(targetCFrame: CFrame): null
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Removed member index 31

HistoryMember
565AnimationWeightedBlendFix: NewAnimationRuntimeSetting
396AutoJointsMode: AutoJointsMode
649DecreaseMinimumPartDensityMode: DecreaseMinimumPartDensityMode
629EditorLiveScripting: EditorLiveScripting
587EnableFluidForces: bool
595HumanoidOnlySetCollisionsOnStateChange: HumanoidOnlySetCollisionsOnStateChange
466MeshPartHeads: MeshPartHeads
600NewPhysicsSolver: PhysicsSolver
373PGSPhysicsSolverEnabled: bool
539PhysicsInertiaAndVolumeFix: PhysicsInertiaAndVolumeFix
442SkinnedMeshEnabled: SkinnedMeshAllowType
443TemporaryLegacyPhysicsSolverOverride: bool
560UnionsScaleNonuniformly: UnionsScaleNonuniformly
410FindPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
410FindPartOnRayWithIgnoreList(ray: Ray, ignoreDescendantsTable: Objects, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
410FindPartOnRayWithWhitelist(ray: Ray, whitelistDescendantsTable: Objects, ignoreWater: bool = false): Tuple
410FindPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Objects
410FindPartsInRegion3WithIgnoreList(region: Region3, ignoreDescendantsTable: Objects, maxParts: int = 20): Objects
410FindPartsInRegion3WithWhiteList(region: Region3, whitelistDescendantsTable: Objects, maxParts: int = 20): Objects
369GetPhysicsAnalyzerBreakOnIssue(): bool
369GetPhysicsAnalyzerIssue(index: int): Objects
163InsertContent(url: Content): Objects
410IsRegion3Empty(region: Region3, ignoreDescendentsInstance: Instance = Instance): bool
410IsRegion3EmptyWithIgnoreList(region: Region3, ignoreDescendentsTable: Objects): bool
466SetMeshPartHeads(value: MeshPartHeads): void
369SetPhysicsAnalyzerBreakOnIssue(enable: bool): void
410findPartOnRay(ray: Ray, ignoreDescendantsInstance: Instance = Instance, terrainCellsAreCubes: bool = false, ignoreWater: bool = false): Tuple
410findPartsInRegion3(region: Region3, ignoreDescendantsInstance: Instance = Instance, maxParts: int = 20): Objects
369PhysicsAnalyzerIssuesFound(count: int)

Description

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 from the Workspace 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.Workspace
  • game:GetService("Workspace")

Notes

History 283

Members 61

AirDensity

TypeDefault
float

The ground level (Y of 0) air density in RMU/stud³ units (see Roblox Units), used to calculate the aerodynamic force if Workspace.FluidForces is Experimental. The default corresponds to realistic sea level air density at standard temperature and pressure. Air density decays as the Y altitude increases, reaching 5% of its ground level value at 100,000 studs. Below Y of 0, the air density is fixed at the input value.

History 1

AllowThirdPartySales

TypeDefault
bool

This Workspace property determines whether assets created by other uses can be sold in the game.

What are third party sales?

When this value is false, as it is by default, only assets created by the place creator (be it a player or a group) and Roblox can be sold using MarketplaceService.

In most cases, games do not need to sell third party assets. However, some games such as trade hangouts require this feature and therefore it exists as an opt-in option.

What third party products can I sell?

Note, developer products can only be sold in the game they are associated with, regardless of what AllowThirdPartySales is set to. This property affects Game Passes and clothing.

This property is not replicated. Its interface does not cross the network boundary.

History 4

Tags: [NotReplicated]

AvatarUnificationMode

TypeDefault
AvatarUnificationMode
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

BreakJoints

Parameters (1)
objectsInstances
Returns (1)
null

Goes through all BaseParts given, breaking any joints connected to these parts. This function will break any of the following types of joints:

Unlike Model:MakeJoints(), this function requires an array of BaseParts as a parameter. This array is given as follows:

1
workspace:BreakJoints({part1, part2, part3})

Note, this function cannot be used by scripts and will only function in plugins.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 6

Tags: [Deprecated]

CSGAsyncDynamicCollision

TypeDefault
CSGAsyncDynamicCollision
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

CalculateJumpDistance

Parameters (3)
gravityfloat
jumpPowerfloat
walkSpeedfloat
Returns (1)
float

History 2

CalculateJumpHeight

Parameters (2)
gravityfloat
jumpPowerfloat
Returns (1)
float

History 2

CalculateJumpPower

Parameters (2)
gravityfloat
jumpHeightfloat
Returns (1)
float

History 2

ClientAnimatorThrottling

TypeDefault
ClientAnimatorThrottlingMode

Specifies the ClientAnimatorThrottlingMode to use for the local client.

When enabled, animations on remotely-simulated Model instances will begin to throttle. The throttler calculates throttling intensity using:

  • Visibility of a Model in relation to the Camera
  • In-game FPS
  • Number of active animations

History 3

CurrentCamera

TypeDefault
Camera

The Camera object being used by the local player.

How to use CurrentCamera

When looking for a client's Camera object, use this property rather than looking for a child of Workspace named "Camera".

When you set this property, all other Camera objects in the Workspace are destroyed, including the previous CurrentCamera. If you set this property to nil or to a camera that is not a descendant of the Workspace (or the CurrentCamera is otherwise destroyed), a new Camera will be created and assigned. Avoid these scenarios, as destroying the camera can have unintended consequences.

For more information, see Scripting the Camera.

This property is not replicated. Its interface does not cross the network boundary.

History 5

Tags: [NotReplicated]

DistributedGameTime

TypeDefault
double

The amount of time, in seconds, that the game has been running.

Despite the title, this value is currently not 'Distributed' across the client and the server. Instead, on the server it represents how long the server has been running. On the client, it represents how long the client has been connected to the server.

Developers should not rely on the above behavior, and it is possible this property will be synchronized across clients and the server in the future.

Those looking for the time since the program started running should use the 'time' function instead. See below for a comparison between DistributedGameTime and its alternatives.

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 running
This property is not replicated. Its interface does not cross the network boundary.

History 4

Tags: [NotReplicated]

ExperimentalSolverIsEnabled

Parameters (0)
No parameters.
Returns (1)
bool

History 2

FallenPartsDestroyHeight

TypeDefault
float

This property determines the height at which the Roblox engine automatically removes falling BaseParts and their ancestor Models from Workspace by parenting them to nil. This is to prevent parts that have fallen off the map from continuing to fall forever.

If a part removed due to this behavior is the last part in a Model, that model will also be removed. This applies to all model ancestors of the part.

This property is clamped between -50,000 and 50,000 because BaseParts do not simulate or render properly at a great distance from the origin due to floating point inaccuracies.

This property can be read by scripts, but can only be set by plugins, the command bar, or the properties window in Studio.

History 4

FluidForces

TypeDefault
FluidForces

With this property enabled, the physics engine computes aerodynamic forces on BaseParts whose EnableFluidForces property is true. The default, Default, disables aerodynamic forces. Note that this property cannot be set through scripting and instead must be toggled in Studio.

This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

GetNumAwakeParts

Parameters (0)
No parameters.
Returns (1)
int

Returns the number of BaseParts that are deemed physically active, due to being recently under the influence of physics.

This function provides a measure of how many BaseParts are being influenced by, or recently under the influence of, physical forces.

print(workspace:GetNumAwakeParts()) -- prints the number of 'awake' parts

Sleeping vs Awake Parts

In order to ensure good performance, Roblox sets BaseParts in which physics are not being applied to a 'sleeping' state. BaseParts with BasePart.Anchored set to true, for example, will always be sleeping as physics doesn't apply to them. When a force is applied to a non anchored BasePart, an 'awake' state will be applied. Whilst a BasePart is awake the Roblox physics engine will perform continuous calculations to ensure physical forces interact correctly with the part. Once the BasePart is no longer subject to physical forces, it will revert to a 'sleeping' state.

History 3

GetPhysicsThrottling

Parameters (0)
No parameters.
Returns (1)
int

Returns an integer, between 0 and 100, representing the percentage of real-time that physics simulation is currently being throttled to.

This function can be used to determine whether, and to what degree, physics throttling is occurring.

What is physics throttling?

Physics throttling occurs when the physics engine detects it cannot keep up with the game in realtime. When physics is being throttled, it will update less frequently causing BaseParts to appear to move slower.

Without throttling, the physics simulation would fall further behind out of sync with the game. This can lead to lower frame rates and other undesirable behavior.

Objects associated with Humanoids are exempt from physics throttling.

See also Workspace:SetPhysicsThrottleEnabled().

Demonstrating physics throttling

Developers should always avoid creating places that overload the physics engine, as it leads to sub-par experience for players. Those wishing to simulate physics throttling for research purposes however, need only create a lot of Parts very quickly.

local i = 0
while true do
	i += 1
	if i % 5 == 0 then
		task.wait()
	end
	local part = Instance.new("Part", workspace)
end

History 7

GetRealPhysicsFPS

Parameters (0)
No parameters.
Returns (1)
double

Returns the number of frames per second that physics is currently being simulated at.

Using GetRealPhysicsFPS to combat exploiters

A common use of this function is to detect if exploiters are increasing their local physics frame rate to move faster. This is generally done by comparing the result returned by a client's GetRealPhysicsFPS to a maximum that will not be breached in normal circumstances (usually 65 or 70). If this limit is breached, developers can use the Player:Kick() function to remove that Player from the game. It is important to remember that, although this practice may be effective sometimes, client-side anti-exploiter measures are never 100% reliable.

History 7

GetServerTimeNow

Parameters (0)
No parameters.
Returns (1)
double

GetServerTimeNow returns the epoch time on the server with microsecond precision. The time is adjusted for drift and smoothed monotonically (it is guaranteed to be non-decreasing). The server clock progresses no faster than 1.006× speed and no slower than 0.994× speed.

Returns a Unix timestamp that can be used with os.date() or with DateTime.fromUnixTimestamp().

This function is useful for creating synchronized experiences, as it has three properties necessary for doing so: it's a real-world time clock, it's monotonic, and it has decent precision.

This function relies on the server, so calling it from a client that isn't connected will throw an error.

See also:

History 2

GlobalWind

TypeDefault
Vector3

This property specifies the direction and strength that wind blows through the experience, affecting terrain grass, dynamic clouds, and particles. See the Global Wind article for details.

History 2

Gravity

TypeDefault
float

Determines the acceleration due to gravity applied to falling BaseParts. This value is measured in studs per second squared and by default is set to 196.2 studs/second2. By changing this value, developers can simulate the effects of lower or higher gravity in game.

History 4

IKControlConstraintSupport

TypeDefault
IKControlConstraintSupport

Enables support for constraints for IKControls. The Default value is the same as Enabled. If disabled, IKControls ignore physics constraints. See IKControl for additional details.

This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

InsertPoint

TypeDefault
Vector3
This property is not replicated. Its interface does not cross the network boundary.

History 1

Tags: [NotReplicated]

JoinToOutsiders

Parameters (2)
objectsInstances
jointTypeJointCreationMode
Returns (1)
null

This function creates joints between the specified Parts and any touching parts depending on the parts' surfaces and the specified joint creation mode.

This function creates joints between the specified Parts and any planar touching surfaces, depending on the parts' surfaces and the specified joint creation mode.

  • Glue, Studs, Inlets, Universal, Weld, and Smooth surfaces will all create Weld instances.
  • Spheres will not surface-weld to anything. The rounded sides of cylinders will not surface-weld, but the flat end sides will.
  • Hinge and Motor surfaces will still create Rotate and RotateP joint instances, regardless of part shape.

The first parameter is an array of BaseParts. Joints will only be created between the parts in the array and not in the array. Joints will not be created between the parts in the array.

The second parameter is a JointCreationMode that determines how joints will be created. Passing in either enum value, Enum.JointCreationMode.All or Enum.JointCreationMode.Surface, has the same behavior which equates to Join Always

This function is used by the Roblox Studio Move tool when the user finishes moving a selection. In conjunction with Plugin:GetJoinMode() and Workspace:UnjoinFromOutsiders() it can be used to retain join functionality when developing custom studio build tools. See the snippets below for an example.

1
2
3
4
5
-- finished moving a selection, make joints
local function finishedMovingParts(parts)
	local joinMode = Plugin:GetJoinMode()
	workspace:JoinToOutsiders(parts, joinMode)
end
1
2
3
4
-- started moving a selection, break joints
local function startMovingParts(parts)
	workspace:UnjoinFromOutsiders(parts)
end

History 4

MakeJoints

Parameters (1)
objectsInstances
Returns (1)
null

Deprecated

SurfaceType based joining is deprecated, do not use MakeJoints for new projects. WeldConstraints and HingeConstraints should be used instead.

Goes through all Parts given. If any part's side has a SurfaceType that can make a joint it will create a joint with any adjacent parts.

Joints will be created between the specified Parts and any planar touching surfaces, depending on the parts' surfaces.

  • Smooth surfaces will not create joints
  • Glue surfaces will create a Glue joint
  • Weld will create a Weld joint with any surface except for Unjoinable
  • Studs, Inlet, or Universal will each create a Snap joint with either of other the other two surfaces (e.g. Studs with Inlet and Universal)
  • Hinge and Motor surfaces create Rotate and RotateV joint instances

Unlike Model:MakeJoints(), this function requires an array of parts as a parameter. This array is given as follows:

workspace:MakeJoints({part1, part2, part3})

Joints are broken if enough force is applied to them due to an Explosion, unless a ForceField object is parented to the BasePart or ancestor Model. For this reason, they are often used to make simple destructible buildings and other models.

This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 6

Tags: [Deprecated]

MeshPartHeadsAndAccessories

TypeDefault
MeshPartHeadsAndAccessories

Sets whether character Heads and Accessories should be downloaded as MeshParts. The Default value is the same as Enabled. If this feature is enabled, built-in avatars will use MeshParts for the character's Head and Accessories.

This property is not scriptable. It cannot be accessed by script code.

History 3

Tags: [NotScriptable]

ModelStreamingBehavior

TypeDefault
ModelStreamingBehavior
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

MoverConstraintRootBehavior

TypeDefault
MoverConstraintRootBehaviorMode

Controls the logic used to select the assembly root part for mechanisms that use any of the following constraints:

When this property is set to MoverConstraintRootBehaviorMode.Enabled, these constraints will be ignored when selecting the assembly root part if the constraint does not transmit forces between two parts (some examples being AngularVelocity.ReactionTorqueEnabled set to false, AlignPosition.ReactionForceEnabled set to false, or AlignOrientation.Mode set to OrientationAlignmentMode.OneAttachment).

When this property is set to MoverConstraintRootBehaviorMode.Disabled, these constraints may be erroneously considered when selecting the assembly root part, leading to inconsistent network ownership and delays when adding these constraints to a mechanism.

This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

PGSIsEnabled

Parameters (0)
No parameters.
Returns (1)
bool

Returns true if the game has the PGS Physics solver enabled.

As Workspace.PGSPhysicsSolverEnabled cannot be accessed by scripts, the PGSIsEnabled function allows developers to tell which physics solver the game is using.

print(workspace:PGSIsEnabled()) -- true = PGS solver enabled
print(workspace:PGSIsEnabled()) -- false = Legacy solver enabled

History 4

PathfindingUseImprovedSearch

TypeDefault
PathfindingUseImprovedSearch
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

PersistentLoaded

Parameters (1)
playerPlayer

This event fires every time a player has been sent all current persistent models and part-less atomic models. The player parameter indicates which player has received all applicable instances.

Note that experience loading happens before persistent loading, and firing of the DataModel.Loaded event does not indicate that all persistent models are present.

History 1

PhysicsSteppingMethod

TypeDefault
PhysicsSteppingMethod

Sets how the solver will advance the physics simulation forward in time. This option is not scriptable and must be set from the PhysicsSteppingMethod property of Workspace within Studio. See Adaptive Timestepping for details.

OptionDescription
AdaptiveThe engine attempts to assign optimal simulation rates for individual assemblies of either 240 Hz, 120 Hz, or 60 Hz. This setting is optimized for performance.
FixedAll simulated assemblies inside the workspace will advance forward at 240 Hz. This option is best for optimal stability and simulation accuracy.
DefaultThe current default is Fixed.

Note that when assemblies of different simulation rates become connected via Constraints or collisions, the combined mechanism will default to the highest simulation rate for stability.

This property is not scriptable. It cannot be accessed by script code.

History 3

Tags: [NotScriptable]

PlayerCharacterDestroyBehavior

TypeDefault
PlayerCharacterDestroyBehavior
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

PrimalPhysicsSolver

TypeDefault
PrimalPhysicsSolver
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

RejectCharacterDeletions

TypeDefault
RejectCharacterDeletions
This property is not scriptable. It cannot be accessed by script code.

History 3

Tags: [NotScriptable]

RenderingCacheOptimizations

TypeDefault
RenderingCacheOptimizationMode
This property is not scriptable. It cannot be accessed by script code.

History 4

Tags: [NotScriptable]

ReplicateInstanceDestroySetting

TypeDefault
ReplicateInstanceDestroySetting
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

Retargeting

TypeDefault
AnimatorRetargetingMode

History 2

SandboxedInstanceMode

TypeDefault
SandboxedInstanceMode
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

SetAvatarUnificationMode

Parameters (1)
valueAvatarUnificationMode
Returns (1)
null

History 1

SetMeshPartHeadsAndAccessories

Parameters (1)
valueMeshPartHeadsAndAccessories
Returns (1)
null

History 2

SetPhysicsThrottleEnabled

Parameters (1)
valuebool
Returns (1)
null

History 3

SignalBehavior

TypeDefault
SignalBehavior

This property determines whether event handlers will be resumed immediately when the event fires, or deferred and then resumed at a later resumption point. Resumption points currently include:

For more information, see Deferred Events.

This property is not scriptable. It cannot be accessed by script code.

History 5

Tags: [NotScriptable]

StreamOutBehavior

TypeDefault
StreamOutBehavior

The StreamOutBehavior controls where content will be unloaded from the ReplicationFocus based on device Memory Conditions, or based on Streaming Radius.

See also:

This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

StreamingEnabled

TypeDefault
bool

The StreamingEnabled property determines whether game content streaming is enabled for the place. This property is not scriptable and therefore must be set on the Workspace object in Studio.

See also:

History 7

StreamingIntegrityMode

TypeDefault
StreamingIntegrityMode

If instance streaming is enabled, an experience may behave in unintended ways if a player's character moves into a region of the world that has not been streamed to their client. The streaming integrity feature offers a way to avoid those potentially problematic situations.

This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

StreamingMinRadius

TypeDefault
int

The StreamingMinRadius property indicates the radius around the player's character or the current ReplicationFocus in which content will be streamed in at the highest priority. Defaults to 64 studs.

Care should be taken when increasing the default minimum radius since doing so will require more memory and more server bandwidth at the expense of other components.

See also:

This property is not scriptable. It cannot be accessed by script code.

History 5

Tags: [NotScriptable]

StreamingTargetRadius

TypeDefault
int

The StreamingTargetRadius property controls the maximum distance away from the player's character or the current ReplicationFocus in which content will be streamed in. Defaults to 1024 studs.

Note that the engine is allowed to retain previously loaded content beyond the target radius, memory permitting.

See also:

This property is not scriptable. It cannot be accessed by script code.

History 5

Tags: [NotScriptable]

Terrain

TypeDefault
Terrain

This property is a reference to the Terrain object parented to the Workspace.

Terrain object within the Workspace hierarchy

See Environmental Terrain for more information.

This property is not replicated. Its interface does not cross the network boundary.
This property is read-only. Its value can be read, but it cannot be modified.

History 6

Tags: [ReadOnly, NotReplicated]

TouchEventsUseCollisionGroups

TypeDefault
RolloutState
This property is not scriptable. It cannot be accessed by script code.

History 1

Tags: [NotScriptable]

TouchesUseCollisionGroups

TypeDefault
bool

This property determines whether parts in different groups set to not collide will ignore collisions and touch events. By default, the value of this property is set to false.

When this property is enabled, parts in different groups set to not collide will also ignore the CanTouch property, similar to how BasePart.CanCollide is ignored. For more information on the behavior of CanTouch, please visit its property page.

This property is not scriptable. It cannot be accessed by script code.

History 4

Tags: [NotScriptable]

UnjoinFromOutsiders

Parameters (1)
objectsInstances
Returns (1)
null

Breaks all joints between the specified BaseParts and other BaseParts.

This function requires an array of BaseParts. Note, joints will not be broken between these BaseParts (each other), only between these BaseParts and other BaseParts not in the array.

This function is used by the Roblox Studio Move tool when the user starts moving a selection. In conjunction with Plugin:GetJoinMode() and Workspace:JoinToOutsiders() it can be used to retain join functionality when developing custom studio build tools. See the snippets below for an example.

-- finished moving a selection, make joints
local function finishedMovingParts(parts)
	local joinMode = Plugin:GetJoinMode()
	workspace:JoinToOutsiders(parts, joinMode)
end
-- started moving a selection, break joints
local function startMovingParts(parts)
	workspace:UnjoinFromOutsiders(parts)
end

History 4

ZoomToExtents

Parameters (0)
No parameters.
Returns (1)
null

Positions and zooms the Workspace.CurrentCamera to show the extent of BaseParts currently in the Workspace.

This function was used in the, now removed, 'Zoom To Extents' button in Roblox Studio. It exhibits similar behavior to the 'Zoom To' (F shortcut) feature, however it shows the extents of the Workspace rather than the currently selected object.

This function cannot be used in scripts but will function in the command bar or plugins.

History 4

Removed members 31

AnimationWeightedBlendFix

TypeDefault
NewAnimationRuntimeSetting
This property is not scriptable. It cannot be accessed by script code.

History 4

Tags: [NotScriptable]

AutoJointsMode

TypeDefault
AutoJointsMode
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

DecreaseMinimumPartDensityMode

TypeDefault
DecreaseMinimumPartDensityMode
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

EditorLiveScripting

TypeDefault
EditorLiveScripting
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

EnableFluidForces

TypeDefault
bool

History 2

FindPartOnRay

Parameters (4)Default
rayRay
ignoreDescendantsInstanceInstanceInstance
terrainCellsAreCubesboolfalse
ignoreWaterboolfalse
Returns (1)
Tuple

History 5

FindPartOnRayWithIgnoreList

Parameters (4)Default
rayRay
ignoreDescendantsTableObjects
terrainCellsAreCubesboolfalse
ignoreWaterboolfalse
Returns (1)
Tuple

History 5

FindPartOnRayWithWhitelist

Parameters (3)Default
rayRay
whitelistDescendantsTableObjects
ignoreWaterboolfalse
Returns (1)
Tuple

History 3

FindPartsInRegion3

Parameters (3)Default
regionRegion3
ignoreDescendantsInstanceInstanceInstance
maxPartsint20
Returns (1)
Objects

History 4

FindPartsInRegion3WithIgnoreList

Parameters (3)Default
regionRegion3
ignoreDescendantsTableObjects
maxPartsint20
Returns (1)
Objects

History 4

FindPartsInRegion3WithWhiteList

Parameters (3)Default
regionRegion3
whitelistDescendantsTableObjects
maxPartsint20
Returns (1)
Objects

History 2

GetPhysicsAnalyzerBreakOnIssue

Parameters (0)
No parameters.
Returns (1)
bool

History 2

GetPhysicsAnalyzerIssue

Parameters (1)
indexint
Returns (1)
Objects

History 2

HumanoidOnlySetCollisionsOnStateChange

TypeDefault
HumanoidOnlySetCollisionsOnStateChange
This property is not scriptable. It cannot be accessed by script code.

History 4

Tags: [NotScriptable]

InsertContent

Parameters (1)
urlContent
Returns (1)
Objects

History 2

IsRegion3Empty

Parameters (2)Default
regionRegion3
ignoreDescendentsInstanceInstanceInstance
Returns (1)
bool

History 2

IsRegion3EmptyWithIgnoreList

Parameters (2)
regionRegion3
ignoreDescendentsTableObjects
Returns (1)
bool

History 2

MeshPartHeads

TypeDefault
MeshPartHeads
This property is not scriptable. It cannot be accessed by script code.

History 3

Tags: [NotScriptable]

NewPhysicsSolver

TypeDefault
PhysicsSolver
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

PGSPhysicsSolverEnabled

TypeDefault
bool
This property is not scriptable. It cannot be accessed by script code.
This property is not replicated. Its interface does not cross the network boundary.

History 2

Tags: [NotReplicated, NotScriptable]

PhysicsAnalyzerIssuesFound

Parameters (1)
countint

History 2

PhysicsInertiaAndVolumeFix

TypeDefault
PhysicsInertiaAndVolumeFix
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

SetMeshPartHeads

Parameters (1)
valueMeshPartHeads
Returns (1)
void

History 5

SetPhysicsAnalyzerBreakOnIssue

Parameters (1)
enablebool
Returns (1)
void

History 2

SkinnedMeshEnabled

TypeDefault
SkinnedMeshAllowType
This property is not scriptable. It cannot be accessed by script code.

History 2

Tags: [NotScriptable]

TemporaryLegacyPhysicsSolverOverride

TypeDefault
bool
This property is not scriptable. It cannot be accessed by script code.
This property is not replicated. Its interface does not cross the network boundary.

History 5

Tags: [NotReplicated, NotScriptable]

UnionsScaleNonuniformly

TypeDefault
UnionsScaleNonuniformly
This property is not scriptable. It cannot be accessed by script code.

History 3

Tags: [NotScriptable]

findPartOnRay

Parameters (4)Default
rayRay
ignoreDescendantsInstanceInstanceInstance
terrainCellsAreCubesboolfalse
ignoreWaterboolfalse
Returns (1)
Tuple
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 4

Tags: [Deprecated]

findPartsInRegion3

Parameters (3)Default
regionRegion3
ignoreDescendantsInstanceInstanceInstance
maxPartsint20
Returns (1)
Objects
This function is deprecated. It exists only for backward compatibility, and should not be used for new work.

History 3

Tags: [Deprecated]

Settings