Open Asterune
Workspace

Workspace

Contains rendered and physically simulated instances.

Service
game:GetService("Workspace")
Inherits
WorldRootModelPVInstanceInstance
Replication
Never

Behavior

Workspace contains the instances used for world rendering and physics. The workspace global references this service.

Summary

Members19
Properties10
Methods9

Properties

BaseplateEnabled

Workspace.BaseplateEnabled: boolean

Whether the default baseplate is enabled.

CurrentCamera

Workspace.CurrentCamera: Camera?

The active camera for the current client. Access it from a LocalScript.

DistributedGameTime

Workspace.DistributedGameTime: number

The elapsed time since the place started, in seconds.

FallenPartsDestroyHeight

Workspace.FallenPartsDestroyHeight: number

The world Y coordinate below which parts are removed.

GlobalWind

Workspace.GlobalWind: Vector3

The world-space wind vector used by wind-aware simulation and rendering.

Gravity

Workspace.Gravity: number

The default gravity acceleration magnitude in studs per second squared. Defaults to 196.2; assignments clamp to 0 through 1000. GravityDirection selects the default direction. Local gravity configurations can override the default.

GravityDirection

Workspace.GravityDirection: Vector3

The default gravity direction as a Vector3. Assignments are normalized. Zero or non-finite vectors produce an error.

StreamingEnabled

Workspace.StreamingEnabled: boolean

Whether the place uses distance-based world streaming.

StreamingMinRadius

Workspace.StreamingMinRadius: number

The minimum streaming radius around a player's viewing origin, in studs.

StreamingTargetRadius

Workspace.StreamingTargetRadius: number

The target streaming radius around a player's viewing origin, in studs.

Methods

ArePartsTouchingOthers

Workspace:ArePartsTouchingOthers(table, number?): boolean

Returns whether the supplied Parts are touching other Parts within the supplied tolerance.

Blockcast

Workspace:Blockcast(cframe: CFrame, size: Vector3, direction: Vector3, params: RaycastParams?): RaycastResult?

Casts a box through the world and returns the first hit.

GetGravityAt

Workspace:GetGravityAt(position: Vector3): Vector3

Returns the gravity acceleration at the supplied world-space position.

GetPartsInPart

Workspace:GetPartsInPart(part: BasePart, overlapParams: OverlapParams?): { BasePart }

Returns Parts overlapping the supplied Part, subject to optional OverlapParams.

OverlapBox

Workspace:OverlapBox(cframe: CFrame, size: Vector3, overlapParams: OverlapParams?): { BasePart }

Returns parts overlapping the specified box.

OverlapSphere

Workspace:OverlapSphere(position: Vector3, radius: number, overlapParams: OverlapParams?): { BasePart }

Returns parts overlapping a sphere.

Raycast

Workspace:Raycast(origin: Vector3, direction: Vector3, raycastParams: RaycastParams?): RaycastResult?

Casts a finite ray and returns the first hit. The direction vector length specifies the cast distance.

Shapecast

Workspace:Shapecast(part: BasePart, direction: Vector3, params: RaycastParams?): RaycastResult?

Casts a shape through the world and returns the first hit.

Spherecast

Workspace:Spherecast(position: Vector3, radius: number, direction: Vector3, params: RaycastParams?): RaycastResult?

Casts a sphere through the world and returns the first hit.

Inherited members

Inherited61

Example

Luau
print(workspace.Gravity)
workspace.GravityDirection = Vector3.new(0, -1, 0)

BasePart · Model · Camera · Region3 · Ray