---
title: "ServerScriptService"
description: "A protected server-side hierarchy service for authoritative ServerScripts and other stored instances."
canonical: "https://docs.glorpia.com/services/serverscriptservice"
markdown: "https://docs.glorpia.com/services/serverscriptservice.md"
---
# ServerScriptService

A protected server-side hierarchy service for authoritative ServerScripts and other stored instances.

**Category:** Services

## Access

```luau
local ServerScriptService = game:GetService("ServerScriptService")

print(ServerScriptService == game.ServerScriptService)
```

## Security

| Name | Type | Description |
| --- | --- | --- |
| `LoadStringEnabled` | boolean | Defaults to false. When enabled in Studio, public ServerScripts may use loadstring(). LocalScripts remain blocked. |

`LoadStringEnabled` is configured in Studio Properties and saved with the place. Creator scripts cannot change it at runtime.

> **Note:** Keep LoadStringEnabled disabled unless a game specifically requires dynamic server-side Luau compilation. Code compiled by loadstring() keeps the same public ServerScript environment and permissions as the script that compiled it.

## ServerScript execution

Enabled creator `ServerScript` instances under ServerScriptService are discovered by the authoritative server and start once when they become runnable.

| Name | Type | Description |
| --- | --- | --- |
| `Enabled ServerScript` | executes once | Runs as public creator server code when discovered under ServerScriptService. |
| `Runtime-created or moved ServerScript` | discovered | An enabled script starts once after it enters a valid server execution location. |
| `Client replication` | excluded | The ServerScriptService tree is not included in normal client replication. |

> **Note:** ServerScripts under Workspace follow the same discovery rule. ServerScripts stored under ServerStorage, ReplicatedStorage, StarterGui or StarterPlayer remain dormant there.

## Hierarchy API

The service root is protected and cannot be renamed, destroyed, dragged, or reparented. Supported instances can be inserted or parented beneath it.

| Name | Type | Description |
| --- | --- | --- |
| `FindFirstChild(name, recursive?)` | method | Finds a child by name. |
| `FindFirstChildOfClass(className)` | method | Finds the first direct child with the exact class name. |
| `GetChildren()` | method | Returns direct children. |
| `GetDescendants()` | method | Returns every descendant. |
| `IsA(className)` | method | Checks the service class or Instance base class. |
| `GetFullName()` | method | Returns ServerScriptService. |

## Example

```luau
local ServerScriptService = game:GetService("ServerScriptService")
local scripts = ServerScriptService:GetChildren()

for _, child in ipairs(scripts) do
    print(child.Name, child.ClassName)
end
```

## Related

- [ServerScript](https://docs.glorpia.com/instances/serverscript.md) — Creator-authored authoritative server code.
- [Public Scripts](https://docs.glorpia.com/scripting/public-scripts.md) — Runtime capabilities and execution rules for ServerScripts and LocalScripts.
- [ServerStorage](https://docs.glorpia.com/services/serverstorage.md) — Server-only storage where scripts stay dormant.
