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

PlayerAdded event not working, why won't my GUI appear?

Question answered by peIIm.


I've set the variables and code that should enable my ScreenGui (make it visible) for the player that joins yet no matter what it just isn't working, I appreciate any help!

local changeteam = game.StarterGui.changeteam local players = game:GetService("Players")

players.PlayerAdded:Connect(function(player) changeteam.Enabled = true end)

1 comment

0

a script can't manipulate children of PlayerGui...you could just have changeteam enabled in StarterGui to begin with, or use a local script & remote event

2 answers

✓ Accepted answer

You don't need scripts to replicate a GUI into PlayerGUI. This should work. Make sure this is a local script. This will make the GUI disappear when you click the button.

local changeteam = script.Parent
changeteam.ImageButton.MouseButton1Down:Connect(function()
changeteam.Enabled = false
end)

3 comments

0

Thanks, working well.

0

You can't access ServerStorage with a local script

0

Changed it.

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