Whenever the server script in the workspace does this code:

local player = "placeholder"

  

game.Players.PlayerAdded:connect(function(plr)

player = plr.Name

end)

  

script.Parent.Touched:connect(function()

game.Players[player].PlayerGui.EggONEHandler.Disabled = false

end)

It says in the output

EggONEHandler is not a valid member of PlayerGui

I've checked many times and it is there. Is it because I set it to disabled or is it because of a different reason. Thanks in advance.

6 comments

0

PlayerGui:WaitForChild("EggONEHandler")

0

server scripts cant see a gui unless its created by a server script

0

^anything in PlayerGui not just guis

0

try putting the thing your trying to find into the server script and then cloning it into the PlayerGui

0

actually yes that's true ^

0

If the gui was cloned from startergui it was done locally, and it doesn't exist on the server. Also why are you saving the name if you're using the instance?