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

Why does it say that my Gui isn't a valid member of PlayerGui?

Here is my simple script:

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		plr.PlayerGui.Sol.Enabled = true
	end)
end)

It says:

Sol is not a valid member of PlayerGui

3 comments

2

Server-sided scripts don't have access to the each clients' PlayerGui's descendants unless the server created and parented that gui

0

Why are you doing this? Just set Enabled to true in Studio. Objects should be saved in their initial state.

0

It's gonna be part of a larger script later.

1 answer

✓ Accepted answer
--// Just put a localscript in the Sol gui and put this code in it.
delay(1, function() 
	script.Parent.Enabled = true
end)

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