Instances
ServerScript
The public creator-authored script class that runs on Glorpia's authoritative server.
Availability
| Name | Type | Description |
|---|---|---|
Execution context | server | Runs on the authoritative game simulation. |
Execution | available | Enabled ServerScripts under Workspace or ServerScriptService start once when discovered; connected callbacks can keep running. |
Studio insertion | available | Insert ServerScript anywhere in Explorer. It remains inactive until it has a valid server execution ancestry. |
Instance.new() | supported | A runtime-created ServerScript starts once after it is enabled and enters Workspace or ServerScriptService. |
Enabled | boolean | Read/write hierarchy property. Enabling an unstarted ServerScript in a valid server context allows it to start on the next runtime script scan. |
script global | available | Inside the script, script refers to that ServerScript instance. |
ServerScript uses the public creator API and does not receive the privileged permissions of CoreScript or CoreLocalScript.ServerScripts can use server-only services such as ServerScriptService and ServerStorage. UserInputService, RunService.RenderStepped, Players.LocalPlayer and workspace.CurrentCamera are not available in the public server context.
Example
Luau
script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
if humanoid then
humanoid.Health = 0
end
end)Public API
What public scripts can doSupported hierarchy, physics, sound, service and replication behavior.BasePartPhysical properties shared by Part and SpawnLocation.BasePart.TouchedAuthoritative contact event behavior.ServerScriptServiceServer-side container where enabled ServerScripts start once when discovered.RemoteEventCommunicate with LocalScripts.RemoteFunctionRequest/response communication with LocalScripts.BasicSoundGlobal and spatial sound playback.