ServerStorage
Server-only storage: objects here are never sent to players.
- Inherits: Service → Instance
- Creatable: No. It’s created with the game; use
ServerStorage(import { ServerStorage } from '@rally/sdk'). - Replication: Server only: it, and everything inside it, is never sent to clients.
Keep templates you clone into the world later, and anything players mustn’t see before it appears, in ServerStorage. Nothing here is simulated or drawn, and scripts inside it don’t run.
Properties
Section titled “Properties”Inherited from Instance: name, archivable, id, className, parent, destroyed
Methods
Section titled “Methods”Inherited from Instance: getPropertyChangedSignal, setAttribute, getAttribute, getAttributes, getAttributeChangedSignal, getChildren, getDescendants, findFirstChild, findFirstChildOfClass, findFirstChildWhichIsA, findFirstAncestor, findFirstAncestorWhichIsA, waitForChild, isA, isDescendantOf, isAncestorOf, getFullName, clearAllChildren, destroy, clone, toString
Events
Section titled “Events”Inherited from Instance: changed, childAdded, childRemoved, descendantAdded, descendantRemoving, ancestryChanged, destroying, attributeChanged
Examples
Section titled “Examples”Clone a template into the world
Section titled “Clone a template into the world”import { Part, ServerStorage, Vector3, getChild, workspace } from '@rally/sdk';
const coinTemplate = getChild(ServerStorage, 'Coin', Part);
function spawnCoin(at: Vector3) { const coin = coinTemplate.clone(); coin.position = at; coin.parent = workspace; // players receive it now return coin;}
spawnCoin(new Vector3(0, 3, 10));