Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by
Jexpler 63
5 years ago

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

2
Server-sided scripts don't have access to the each clients' PlayerGui's descendants unless the server created and parented that gui Rare_tendo 3000 — 5y
0
Why are you doing this? Just set Enabled to true in Studio. Objects should be saved in their initial state. evaera 8028 — 5y
0
It's gonna be part of a larger script later. Jexpler 63 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago
--// Just put a localscript in the Sol gui and put this code in it.
delay(1, function() 
    script.Parent.Enabled = true
end)
Ad

Answer this question