Skip to content

ReplicatedStorage

Shared storage that the server and every player can see: remotes, shared values and templates.

  • Inherits: Service → Instance
  • Creatable: No. It’s created with the game; use ReplicatedStorage (import { ReplicatedStorage } from '@rally/sdk').
  • Replication: Replicated: clients get a copy, and changes the server makes reach them.

Objects in ReplicatedStorage aren’t in the world (they aren’t simulated or drawn), but they replicate to every player’s device. Put RemoteEvents, RemoteFunctions, shared values and templates that clients also need here. Scripts inside it don’t run.

Inherited from Instance: name, archivable, id, className, parent, destroyed

Inherited from Instance: getPropertyChangedSignal, setAttribute, getAttribute, getAttributes, getAttributeChangedSignal, getChildren, getDescendants, findFirstChild, findFirstChildOfClass, findFirstChildWhichIsA, findFirstAncestor, findFirstAncestorWhichIsA, waitForChild, isA, isDescendantOf, isAncestorOf, getFullName, clearAllChildren, destroy, clone, toString

Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged

import { RemoteEvent, ReplicatedStorage, getChild, print, task, waitForChild } from '@rally/sdk';
// On the server the remote is there from the start.
const announce = getChild(ReplicatedStorage, 'Announce', RemoteEvent);
announce.fireAllClients('Welcome!');
// On a player's device it may still be arriving: wait for it.
task.spawn(async () => {
const sameRemote = await waitForChild(ReplicatedStorage, 'Announce', RemoteEvent);
sameRemote.onClientEvent.connect((message) => print(message));
});