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

ServerStorage is not a valid member of DataModel?

Asked by 8 years ago

I'm getting this error ingame not in studio, play solo.I checked using shift f9 So the error is: "ServerStorage is not a valid member of DataModel" Here's the line of the script that gives me that error

I'd apreciate any help, thank you.

local folders = game.ServerStorage[".PlayerFolders"]
                local playerFolder = folders:FindFirstChild(player.Name)
                if playerFolder.DF.Value == "" or playerFolder.DF.Value == "Nothing" then
                    local hasdf = false
                else
                    hasdf = true
                end
0
Where is player defined? Rythian2277 65 — 8y
0
"Here's the line of the script that gives me that error" brokenrares 48 — 8y
0
player is script.Parent.Parent.Parent (the script is in a tool) brokenrares 48 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

If this code is in a local script, you should be aware that serverstorage is not visible to client and may only be accessed by a local script on the client.

Otherwise you can try this: local serverstorage = game:GetService("ServerStorage")

0
It's on a local script.Local script on the client?Could you give me an example of that?Or a link.. brokenrares 48 — 8y
0
Local Scripts run for the client. It's locally run meaning that it has different functionalities that the server may not be able to provide the user/client. In some cases such as yours, local scripts can not access or modify certain services or replicate changes to other players/clients. This is why Server Storage can not be found by a LocalScript. M39a9am3R 3210 — 8y
Ad

Answer this question