Workspace
Show Deprecated
Summary
Methods
- Spherecast(position : Vector3,radius : number,direction : Vector3,params : RaycastParams):RaycastResult?
Properties
AirDensity
AllowThirdPartySales
AuthorityMode
AvatarUnificationMode
ClientAnimatorThrottling
CurrentCamera
DistributedGameTime
FallHeightEnabled
FallenPartsDestroyHeight
FluidForces
GlobalWind
Gravity
Code Samples
Low Gravity Button
local MOON_GRAVITY_RATIO = 1.62 / 9.81
local DEFAULT_GRAVITY = 196.2
local MOON_GRAVITY = DEFAULT_GRAVITY * MOON_GRAVITY_RATIO
-- Create a touch pad
local pad = Instance.new("Part")
pad.Size = Vector3.new(5, 1, 5)
pad.Position = Vector3.new(0, 0.5, 0)
pad.Anchored = true
pad.BrickColor = BrickColor.new("Bright green")
pad.Parent = workspace
-- Listen for pad touch
local enabled = false
local debounce = false
local function onPadTouched(_hit)
if not debounce then
debounce = true
enabled = not enabled
workspace.Gravity = enabled and MOON_GRAVITY or DEFAULT_GRAVITY
pad.BrickColor = enabled and BrickColor.new("Bright red") or BrickColor.new("Bright green")
task.wait(1)
debounce = false
end
end
pad.Touched:Connect(onPadTouched)
IKControlConstraintSupport
InsertPoint
LuauTypeCheckMode
MeshPartHeadsAndAccessories
ModelStreamingBehavior
MoverConstraintRootBehavior
PathfindingUseImprovedSearch
PhysicsImprovedSleep
PhysicsSteppingMethod
PlayerCharacterDestroyBehavior
PrimalPhysicsSolver
RejectCharacterDeletions
RenderingCacheOptimizations
ReplicateInstanceDestroySetting
Retargeting
SandboxedInstanceMode
SignalBehavior
StreamOutBehavior
StreamingEnabled
StreamingIntegrityMode
StreamingMinRadius
StreamingTargetRadius
Terrain
TouchEventsUseCollisionGroups
TouchesUseCollisionGroups
UseImprovedModelLod
UseNewLuauTypeSolver
Properties inherited from Model
Properties inherited from PVInstance
Methods
GetRealPhysicsFPS
Returns
Code Samples
Workspace:GetRealPhysicsFPS
local Players = game:GetService("Players")
local player = Players.LocalPlayer
while task.wait(1) do
if workspace:GetRealPhysicsFPS() > 65 then
player:Kick()
end
end
UnjoinFromOutsiders
()
Parameters
objects: Instances
Returns
()
ZoomToExtents
()
Returns
()
Properties inherited from WorldRoot
Properties inherited from Model
Properties inherited from PVInstance