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

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

Asked by
rdkv 12
6 years ago
Edited 6 years ago

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)

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 Vulkarin 581 — 6y

2 answers

Log in to vote
0
Answered by
piRadians 297 Moderation Voter
6 years ago
Edited 6 years ago

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)

0
Thanks, working well. rdkv 12 — 6y
0
You can't access ServerStorage with a local script Vulkarin 581 — 6y
0
Changed it. piRadians 297 — 6y
Ad
Log in to vote
1
Answered by
rdkv 12
6 years ago

Question answered by peIIm.

Answer this question