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

ServerStorage is not a valid member of DataModel?

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

3 comments

0

Where is player defined?

0

"Here's the line of the script that gives me that error"

0

player is script.Parent.Parent.Parent (the script is in a tool)

1 answer

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

2 comments

0

It's on a local script.Local script on the client?Could you give me an example of that?Or a link..

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.

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