Workspace
Workspace : WorldRoot
Overview
A Workspace is a core container for elements that require real-time rendering and interaction within the game world
Objects placed here are instantly activated and reflected in the game. BaseParts are affected by the physics engine based on their Anchored property, while visual effect elements, such as BillboardGui, PointLight, and ParticleEmitter, are displayed at their attached positions.
Please note that elements like ParticleEmitter, BillboardGui, and PointLight, which depend on specific objects, will appear at the default position (0, 0, 0) if placed directly in Workspace,
Objects like bullets, intended to appear only at specific moments during gameplay, are typically managed outside Workspace, and often stored in ReplicatedStorage or ServerStorage depending on the purpose.
Properties
CurrentCamera
Camera
This is the current camera object assigned to the local player.
Code Samples
local Workspace = game:GetService("Workspace")
local CurrentCamera = Workspace.CurrentCamera
print(CurrentCamera)
Gravity
number
This property sets the game world’s gravity in meters per second squared.
The lower the value, the weaker the gravity; the higher the value, the stronger the gravity.
Code Samples
local Workspace = game:GetService("Workspace")
Workspace.Gravity = 10000
HitboxType
Enum.HitboxType
This property sets the unit for character hit detection.
This property cannot be changed dynamically.
Code Samples
Methods
GetServerTimeNow
Currently not supported.
Parameters
Return
number
Code Samples
Events
Last updated