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

Why doesn't the server recognize the ServerScriptService?

Whenever I play the game in Roblox (not studio), the client always pops up an error message.

Error message: ServerScriptService is not a valid member of DataModel

Script:

wait(10)
print("LoadMapScript activated")
ReplicatedStorage = game:GetService("ReplicatedStorage")
ServerScriptService = game:GetService("ServerScriptService")
win = game.ServerScriptService.values:WaitForChild("win")
mapvalue = game.ServerScriptService.values:WaitForChild("mapvalue")
win.Value = 2

3 comments

0

Where is your script located

0

ServerScriptService.

0

Don't use ServerScriptService for storage!

1 answer

✓ Accepted answer

The client cannot access server script service nor server storage. Put any content that the client needs access to in game.ReplicatedStorage

I suggest trying remote events though if you want a non-experimental mode (filtering enabled) game.

1 comment

0

Although It's done, I appreciate your answer.

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