This class is a Service! It is a top-level singleton which can be retrieved using the
This object cannot be created with the Instance.new constructor function.
Complex games often require a range of assets that are held in storage until they’re required. ReplicatedStorage is a container whose contents are replicated to all connected clients, allowing such objects to be stored until needed. ReplicatedStorage is also an ideal location for
RemoteEvent|RemoteEvents since they can be found on both the client and server.
Note these additional details about ReplicatedStorage:
- Objects descending from ReplicatedStorage can be accessed from a
LocalScripton both the server and client.
- Objects can be replicated to the client by parenting them to ReplicatedStorage:
object.Parent = game:GetService("ReplicatedStorage") -- From the server
- Although the client can access and modify ReplicatedStorage, these changes will not replicate to the server or other clients.
LocalScript|LocalScriptswill not run when they are parented to ReplicatedStorage, although
ModuleScript|ModuleScriptscontained within it can be accessed and executed. There are a number of alternative containers where client-side scripts will run, such as
- For objects that only the server requires access to, we recommended you use
ServerStorageto minimize network traffic.