Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

ServerStorage not a valid member of DataModel?

Hi I had a problem when the mask randomly came off after a renderstepped heartbeat loop that was on the character with a weld script and all. But then I made it so that if it can't find 'Handle' It'll say

local Backup = game.ServerStorage.Assets.Killers['The Butcher'].Hats:Clone()

And a bit more of code, but my problem is, It says 'ServerStorage is NOT a valid member of DataModel' If anyone can help it'd be appreciated thanks.

1 comment

0

Are you by any chance calling this from a LocalScript? LocalScripts are unable to access serverside services.

1 answer

✓ Accepted answer

You can only access ServerStorage through a Script, not a LocalScript. Also, please when calling ServerStorage use this:

local serverStorage = game:GetService("ServerStorage")

instead of:

local serverStorage = game.ServerStorage

If you need to use a LocalScript, put your item in ReplicatedStorage and call it like:

local repStorage = game:GetService("ReplicatedStorage")

This discussion is preserved as it was. New answers, comments, and votes are closed.