---
title: "game:GetService()"
description: "Returns a registered Glorpia service by name."
canonical: "https://docs.glorpia.com/scripting/functions/get-service"
markdown: "https://docs.glorpia.com/scripting/functions/get-service.md"
---
# game:GetService()

Returns a registered Glorpia service by name.

**Category:** Scripting / Function

## Syntax

```luau
game:GetService(serviceName)
```

## Parameters and return value

| Name | Type | Description |
| --- | --- | --- |
| `serviceName` | string | Registered service name. |
| `return` | service | The matching service object. |
| `error` | runtime error | Raised when the requested service is not registered or is not permitted for the current script context. |

## Registered services

| Name | Type | Description |
| --- | --- | --- |
| `Workspace` | service | World hierarchy, CurrentCamera and raycasts. |
| `RunService` | service | Frame timing signals and runtime-state queries. |
| `UserInputService` | service | Client keyboard and mouse input for LocalScripts and CoreScripts. |
| `Players` | service | Player list, LocalPlayer and player signals. |
| `Lighting` | service | Brightness and time of day. |
| `TweenService` | service | Property animation and easing. |
| `DebrisService` | service | Schedules Instances for delayed destruction. Debris is an alias. |
| `ServerScriptService` | service | Server-side hierarchy for executable ServerScripts. |
| `ServerStorage` | service | Server-only stored hierarchy. |
| `ReplicatedStorage` | service | Shared stored hierarchy for supported replicated instances. |

> **Note:** `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

- [Workspace](https://docs.glorpia.com/services/workspace.md) — World hierarchy and raycasts.
- [RunService](https://docs.glorpia.com/services/runservice.md) — Frame signals and runtime state.
- [UserInputService](https://docs.glorpia.com/services/userinputservice.md) — Client input state and events for LocalScripts and CoreScripts.
- [Players](https://docs.glorpia.com/services/players.md) — Player access and events.
- [Lighting](https://docs.glorpia.com/services/lighting.md) — Scene lighting controls.
- [TweenService](https://docs.glorpia.com/services/tweenservice.md) — Property animation.
- [DebrisService](https://docs.glorpia.com/services/debrisservice.md) — Delayed Instance cleanup.
- [ServerScriptService](https://docs.glorpia.com/services/serverscriptservice.md) — Authoritative server script container.
- [ServerStorage](https://docs.glorpia.com/services/serverstorage.md) — Server-only stored hierarchy.
- [ReplicatedStorage](https://docs.glorpia.com/services/replicatedstorage.md) — Shared replicated storage hierarchy.
