Services
Engine-wide objects that expose world, timing, input, player, lighting, hierarchy storage and animation systems.
Available services
Accessing services
game:GetService() provides Workspace, RunService, UserInputService, Players, Lighting, TweenService, DebrisService, ServerScriptService, ServerStorage, StarterGui, StarterPlayer and ReplicatedStorage.
local Workspace = game:GetService("Workspace")
local Lighting = game:GetService("Lighting")
local TweenService = game:GetService("TweenService")
local DebrisService = game:GetService("DebrisService")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")
local StarterGui = game:GetService("StarterGui")
local StarterPlayer = game:GetService("StarterPlayer")
local ReplicatedStorage = game:GetService("ReplicatedStorage")workspace and game.Workspace refer to the same Workspace service. Players, Lighting, DebrisService, ServerScriptService, ServerStorage, StarterGui, StarterPlayer and ReplicatedStorage are also available as direct properties on game.Hierarchy storage rules
ServerScriptService, ServerStorage, StarterGui, StarterPlayer and ReplicatedStorage are protected service roots. The roots cannot be renamed, destroyed, dragged or reparented, while supported child instances can be stored beneath them.
Parts and BasicSounds only participate in the live world when they are under Workspace. StarterGui and StarterPlayer are template trees: their LocalScripts stay inactive there and run only after their runtime copies are cloned into PlayerGui, PlayerScripts or a Character. ServerScriptService and ServerStorage are excluded from normal client replication. Supported ReplicatedStorage descendants use normal server-to-client replication.