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!
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")
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.
Instead of game.ServerStorage you should use game.Lighting. It's more simpler.