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

ServerStorage not a valid member of DataModel?

Asked by
xEiffel 280 Moderation Voter
6 years ago

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.

0
Are you by any chance calling this from a LocalScript? LocalScripts are unable to access serverside services. DevNetx 250 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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")
Ad

Answer this question