Fandom

ROBLOX Wikia

Class:Workspace

Redirected from Workspace

12,564pages on
this wiki
Add New Page
Talk0 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

Pubfield Object CurrentCamera

Pubfield double DistributedGameTime

Protfield bool FilteringEnabled [ScriptWriteRestricted: [PluginSecurity]]

Pubfield float Gravity

Pubfield bool StreamingEnabled

Pubfield Object Terrain [readonly]

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()

Protmethod bool GetPhysicsAnalyzerBreakOnIssue() [PluginSecurity]

Protmethod Objects GetPhysicsAnalyzerIssue(int index) [PluginSecurity]

Pubmethod int GetPhysicsThrottling()

Pubmethod double GetRealPhysicsFPS()

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

Pubmethod bool IsRegion3EmptyWithIgnoreList(Region3 region, Objects ignoreDescendentsTable)

Pubmethod void JoinToOutsiders(Objects objects, JointCreationMode jointType)

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)

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.