Services
ReplicatedStorage
A protected hierarchy service for stored instances that are shared with clients when their instance type is supported by replication.
Access
Luau
local ReplicatedStorage = game:GetService("ReplicatedStorage")
print(ReplicatedStorage == game.ReplicatedStorage)Behaviour
| Name | Type | Description |
|---|---|---|
Client replication | supported descendants | Supported descendants use normal server-to-client hierarchy replication. |
World rendering | not in Workspace | Parts stored here are not rendered as Workspace geometry. |
World physics | not in Workspace | Parts stored here are not included in Workspace physics. |
BasicSound playback | inactive while stored | BasicSound outside Workspace is not played until it is moved into Workspace. |
Script execution | dormant while stored | ServerScripts and LocalScripts stored here do not execute from ReplicatedStorage in the current runtime. |
RemoteEvent / RemoteFunction | replicated | Use remotes here when both ServerScripts and LocalScripts need to resolve the same shared remote instance. |
Hierarchy API
ReplicatedStorage is a protected service root. The service itself cannot be renamed, destroyed, dragged, or reparented, but supported child instances can be parented into it.
| Name | Type | Description |
|---|---|---|
FindFirstChild(name, recursive?) | method | Finds a child by name and can search descendants when recursive is true. |
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 | Returns true for ReplicatedStorage or Instance as appropriate. |
GetFullName() | method | Returns the hierarchy name for the service. |
Example: shared stored hierarchy
Luau
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local folder = Instance.new("Folder")
folder.Name = "SharedObjects"
folder.Parent = ReplicatedStorage
local part = Instance.new("Part")
part.Name = "TemplatePart"
part.Parent = folderThe Part is stored in the replicated hierarchy, but it does not become world geometry until it is parented under Workspace.
Related
ServerScriptServiceServer-side container where enabled ServerScripts start once when discovered.ServerStorageServer-only stored hierarchy excluded from client replication.RemoteEventOne-way communication between client and server scripts.RemoteFunctionRequest/response communication between client and server scripts.game:GetService()Access registered Glorpia services by name.