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 Player?

Asked by 4 years ago

I have been working on a spectate UI and I only want to make it appear when your not in-game, but I get this error at line 10: ServerStorage is not a valid member of Player. Can someone please help me.

01local player = game.Players.LocalPlayer
02local SpectateButton = script.Parent.Spectate
03local Intro = script.Parent.Parent.MainGUI.Intro
04 
05while wait() do
06if not player:FindFirstChild("Contestant") then
07    if Intro.Visible == false then
08    SpectateButton.Visible = true
09 
10    if script.Parent.Parent.Parent.ServerStorage.GameValues.GameInProgress.Value == true then
11        SpectateButton.Visible = false
12 
13    if script.Parent.Parent.Parent.ServerStorage.GameValues.GameInProgress.Value == false then
14        SpectateButton.Visible = true
15 
View all 23 lines...
0
You can not access serverstorage through a local script. You will need to put the items in replicatedstorage or find another work-around DarkDanny04 407 — 4y
1
oh ok thanks :) coreyhsGames 5 — 4y

Answer this question