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

What does this mean?

Asked by 9 years ago

I am trying to access ServerStorage, by going game.ServerStorage, but then the output displays 'ServerStorage is not a valid member of DataModel.' Should I not use ServerStorage for storing stuff which I clone?

Code (the variables, as they are the problem)

local ngill = game.ServerStorage.Narrowgill:Clone()

local tmple = game.ServerStorage.Temple:Clone()

local pgrounds = game.ServerStorage.Pitgrounds:Clone()

local btops = game.ServerStorage.Bricktops:Clone()

local bstn = game.ServerStorage.Bastion:Clone()

local lobby = game.ServerStorage.Lobby:Clone()

Thanks, if you can answer, it would be greatly appreciated!

3 answers

Log in to vote
1
Answered by 9 years ago

Localscripts can not access serverstorage, If you want to use serverstorage you have to use a ModuleScript or a normal Script. To do this you want to use;

game:WaitForChild("ServerStorage")

Documentation Of WaitForChild

[EDIT] Documentation For ServerStorage

0
Updated again Rythian2277 65 — 9y
Ad
Log in to vote
0
Answered by
Redbullusa 1580 Moderation Voter
9 years ago

You can use ServerStorage if the object you're using has a global (not a client) purpose. This means that a regular script is more ideal than a local script, since local scripts are client-based.

Log in to vote
-2
Answered by
Dominical 215 Moderation Voter
9 years ago

Instead of game.ServerStorage you should use game.Lighting. It's more simpler.

Answer this question