I need help with this script. So basically im trying to make a gui appear after the player joined for some seconds but its not working (im new at scripting btw)
heres the script:
script.Parent.Visible = false
game.Players.PlayerAdded:Connect(function(player)
script.Parent.Visible = false
wait(10)
script.Parent.Visible = true
end)
and heres the pic :
7z99
(cody)
September 30, 2021, 10:23pm
#2
You don’t need the connection because players.PlayerAdded doesn’t fire when the local player joins.
This should work, you shouldn’t have to put it in a function, it should run right away:
script.Parent.Visible = false
wait(10)
script.Parent.Visible = true
2 Likes
TheSuzerain
(TheSuzerain)
September 30, 2021, 10:29pm
#3
I’ve noticed in the past that the GUI will become visible before the player actually is in the game.
I’d recommend waiting for the player’s character to be added and then running the code:
script.Parent.Visible = false
local Player = game.Players.LocalPlayer
Player.CharacterAdded:Wait()
wait(10)
script.Parent.Visible = true
1 Like
script.parent.visible = false
wait(10)
script.parent.visible = true
put this in a local script
1 Like
Azul_Cult
(黒死病)
September 30, 2021, 10:32pm
#5
Thing is, the script is probably actually working, it’s just 10 seconds is too short, try making 10 seconds higher.
1 Like
Hm
ok im gonna try i will give back feedback
nope no work i put it for 20 seconds and still no work
anyways i got the solution already
1 Like