Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can you use ServerStorage in a local script?

Asked by 8 years ago

I'm getting an error:

Server storage is not a valid member of DataModel.

Why is this? You can use ServerStorage in a local script right? If not, what are the alternatives? Help. Thanks!

0
No you cannot. An alternative is to use ReplicatedStorage. Discern 1007 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

ServerStorage cannot be accessed with LocalScripts, since it is only accessible by server.

ReplicatedStorage does work in LocalScripts, as the contents are replicated in the client and server.

local repStorage = game.ReplicatedStorage:findFirstChild("WhateverName")
0
Thanks, this will do. Great help! Arithmeticity 167 — 8y
Ad

Answer this question