Fandom

ROBLOX Wikia

Class:Workspace

Redirected from Workspace

12,752pages on
this wiki
Add New Page
Comments0 Share

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 because of which heading extremely far out results in lag or glitches. The Workspace is mostly used for housing the environment of a game. Other objects that may appear later are stored in ServerStorage. All the visible parts in a game must be put in the Workspace. Scripts, while usually put in ServerScriptService, will also run if they are put in the Workspace. The Workspace class inherits from RootInstance.

Properties

This class has seven properties.

Pubfield bool AllowThirdPartySales

Whether or not sales of assets not made by the game creator or ROBLOX are allowed.

Pubfield Object CurrentCamera

The LocalPlayer's camera object. This property can only be used in ExplorerImageIndex 18LocalScripts.

Pubfield double DistributedGameTime

Protfield bool FilteringEnabled [ScriptWriteRestricted: [PluginSecurity]]

If turned on, things that happen on the client will not replicate to the server.

Pubfield float Gravity

The bigger this value, the faster objects will hit the ground. If set to 0, parts cannot move up and down.

Pubfield bool StreamingEnabled

Pubfield Object Terrain [readonly]

A reference to the ExplorerImageIndex 65Terrain object.

Methods

This class has twenty-three methods.

Protmethod void BreakJoints(Objects objects) [PluginSecurity]

Protmethod bool ExperimentalSolverIsEnabled() [LocalUserSecurity]

Pubmethod Tuple FindPartOnRay(Ray ray, Instance ignoreDescendentsInstance = nil, bool terrainCellsAreCubes = false, bool ignoreWater = false)

Return type is (BasePart, Vector3) if the ray hits. If it misses it will return (nil, PointAtEndOfRay)

Pubmethod Tuple FindPartOnRayWithIgnoreList(Ray ray, Objects ignoreDescendentsTable, bool terrainCellsAreCubes = false, bool ignoreWater = false)

Return type is (BasePart, Vector3) if the ray hits. If it misses it will return (nil, PointAtEndOfRay)

Pubmethod Tuple FindPartOnRayWithWhitelist(Ray ray, Objects whitelistDescendentsTable, bool ignoreWater = false)

Pubmethod Objects FindPartsInRegion3(Region3 region, Instance ignoreDescendentsInstance = nil, int maxParts = 20)

Returns parts in the area defined by the Region3, up to specified maxCount or 100, whichever is less

Pubmethod Objects FindPartsInRegion3WithIgnoreList(Region3 region, Objects ignoreDescendentsTable, int maxParts = 20)

Returns parts in the area defined by the Region3, up to specified maxCount or 100, whichever is less

Pubmethod int GetNumAwakeParts()

Returns the amount of BaseParts that are doing something.

Protmethod bool GetPhysicsAnalyzerBreakOnIssue() [PluginSecurity]

Protmethod Objects GetPhysicsAnalyzerIssue(int index) [PluginSecurity]

Pubmethod int GetPhysicsThrottling()

Pubmethod double GetRealPhysicsFPS()

Pubmethod bool IsRegion3Empty(Region3 region, Instance ignoreDescendentsInstance = nil)

Whether or not the given Region3 is empty.

Pubmethod bool IsRegion3EmptyWithIgnoreList(Region3 region, Objects ignoreDescendentsTable)

Pubmethod void JoinToOutsiders(Objects objects, JointCreationMode jointType)

Joins the parts inside the table to surface jointed parts not inside the table.

Protmethod void MakeJoints(Objects objects) [PluginSecurity]

Pubmethod bool PGSIsEnabled()

Protmethod void SetPhysicsAnalyzerBreakOnIssue(bool enable) [PluginSecurity]

Protmethod void SetPhysicsThrottleEnabled(bool value) [LocalUserSecurity]

Pubmethod void UnjoinFromOutsiders(Objects objects)

Unjoins the parts inside the table to surface jointed parts not inside the table.

Protmethod void ZoomToExtents() [PluginSecurity]

Pubmethod Tuple findPartOnRay(Ray ray, Instance ignoreDescendentsInstance = nil, bool terrainCellsAreCubes = false, bool ignoreWater = false) [deprecated]

Pubmethod Objects findPartsInRegion3(Region3 region, Instance ignoreDescendentsInstance = nil, int maxParts = 20) [deprecated]

Events

This class has one event.

Protevent PhysicsAnalyzerIssuesFound(int count) [PluginSecurity]

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.