Glorpia Docs
Scripting / Function

game:GetService()

Returns a registered Glorpia service by name.

Syntax

game:GetService(serviceName)

Parameters and return value

NameTypeDescription
serviceNamestringRegistered service name.
returnserviceThe matching service object.
errorruntime errorRaised when the requested service is not registered or is not permitted for the current script context.

Registered services

NameTypeDescription
WorkspaceserviceWorld hierarchy, CurrentCamera and raycasts.
RunServiceserviceFrame timing signals and runtime-state queries.
UserInputServiceserviceClient keyboard and mouse input for LocalScripts and CoreScripts.
PlayersservicePlayer list, LocalPlayer and player signals.
LightingserviceBrightness and time of day.
TweenServiceserviceProperty animation and easing.
DebrisServiceserviceSchedules Instances for delayed destruction. Debris is an alias.
ServerScriptServiceserviceServer-side hierarchy for executable ServerScripts.
ServerStorageserviceServer-only stored hierarchy.
ReplicatedStorageserviceShared stored hierarchy for supported replicated instances.
game.Workspace, game.Players, game.Lighting, game.ServerScriptService, game.ServerStorage, game.ReplicatedStorage, game.DebrisService and game.Debris are also available as direct properties.

Public script permissions

Public ServerScripts cannot request UserInputService. Public LocalScripts cannot request ServerScriptService or ServerStorage. Shared documented services such as Workspace, Players, Lighting, ReplicatedStorage, TweenService, DebrisService and RunService are available on both sides.

Example

Luau
local Workspace = game:GetService("Workspace")
local Lighting = game:GetService("Lighting")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local DebrisService = game:GetService("DebrisService")

print(Workspace == game.Workspace)
print(ReplicatedStorage == game.ReplicatedStorage)
Lighting.TimeOfDay = "12:00:00"

Service reference