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

Gui Doesn't Appear When a New Player Joins?

Asked by 10 years ago

I was coding a Gui which pops up when ever a new player joins I tryed everything to fix it but it won't do what I say for it to do I tryed usingPlayerAdded() and CharacterAdded() events and both didn't work, here's the code I made.

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        Run()
    end)
end)

The script did in fact have no errors so it might be trying to process it but it can't input the code to do the function I have.

2 answers

Log in to vote
1
Answered by 10 years ago

I kind of edited your script, I hope this helps!;

game.Players.PlayerAdded:connect(function(plr)
repeat wait(0) until plr and plr:FindFirstChild("PlayerGui")and plr.Character and script:FindFirstChild("STRING NAME HERE")
GUI=script.STRINGNAMEHERE:Clone()
GUI.Parent=plr.PlayerGui
end) 
0
Thank you TheAlphaStigma, you helped me make it work and it finally is functioning. Thank you! ChefBuckeye 0 — 10y
0
No Problem. ;) TheeDeathCaster 2368 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Did you put your gui in "StarterGui" if you didn't that's why it won't come up.

0
It is ChefBuckeye 0 — 10y

Answer this question