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

waiting script not working?

Asked by 10 years ago
function welcome()
    wait(1)
    script.Parent.Visible = True
    end
game.Players.PlayerAdded:connect(welcome)

this script is so that when a player joins the game it will wait one second before showing the GUI that says welcome, for some reason it does not work. also for some reason i dont have my decals in my toolbox are, the drop down thing only goes as far as deadly machines

2 answers

Log in to vote
1
Answered by 10 years ago
game.Players.PlayerAdded:connect(function(player)
    function onClick()
            wait(1)
            player.PlayerGUI.GUI.Visible = true
    end
end)
player.PlayerGUI.GUI.MouseButton1Click:connect(onClick)

The PlayerAdded event is run when a player joins a game, the (player) will find the persons name who has joined, it will then wait for the player to click the TextButton before waiting one second before using the name it found earlier to search through the PlayerGUI and finding the right GUI and making it visible.

Apologies for the bad answer earlier, I was tired.

0
this doesnt work namelessassasin 30 — 10y
0
You must change the .GUI. to the name of your GUI and/or it's children. cainsuper3 15 — 10y
0
did you mean "Players" instead of player namelessassasin 30 — 10y
0
i dont get this script over all, can you explain it to me and also explain why mine did not work namelessassasin 30 — 10y
Ad
Log in to vote
0
Answered by
lomo0987 250 Moderation Voter
10 years ago
function welcome()
    wait(1)
    script.Parent.Visible = true -- you put 'True' with a capped 'T'. It can't be like that.
    end
game.Players.PlayerAdded:connect(welcome)

This should fix it for you. Just make sure you put this script in the frame of the 'welcome gui' that you have.

Edit: this is what I like to do, i don't like to do the top one.. :/

game.Players.PlayerAdded:connect(Function welcome()
    wait(1)
    script.Parent.Visible = true
end)
0
ok namelessassasin 30 — 10y
0
Tell me if it works now. :D lomo0987 250 — 10y
0
it still doesnt work, i dont get it.. the script is a child of the text label, and then i make the visiblity true, but it still stays false when i test it, namelessassasin 30 — 10y
0
Here, Try the one that i just edited. It's the 2nd one. lomo0987 250 — 10y
View all comments (3 more)
0
i dont think that one worked either, i seriously dont get the problem, go on your roblox studio to see if the script works for you, maybe its because where i placed the script and what i named the labels, im still a beginner lol namelessassasin 30 — 10y
0
Here, make it a model and have it free, then pm me on roblox the link of the model. I will make it work and put it as a free model and it will work then. lomo0987 250 — 10y
0
just make a text button and put the script in and see if it works, namelessassasin 30 — 10y

Answer this question