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

This will not work. Why?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

There is something wrong with this:

local gui = game.Players.GetAllChildren.PlayerGui.ScreenGui.TextLabel

while true do
    gui.Text = "Welcome to awesome town!"
    wait(1)
    gui.Text = "You are very awesome!"
    wait(1)
end

1 answer

Log in to vote
0
Answered by 8 years ago

Not sure why you'd want to everlastingly loop this but here you go-->

while true do
    for index, value in pairs(game.Players:GetChildren())do
        local gui = value.PlayerGui.ScreenGui.TextLabel
        gui.Text = "Welcome to awesome town!"
        wait(1)
        gui.Text = "You are very awesome!"
        wait(1)
    end
end
0
But every time they die, it starts all over again. I don't want that! NeonicPlasma 181 — 8y
0
What do you want then? I can help you write a new script. What you wrote is obviously not what you wanted. ClassicTheBlue 65 — 8y
0
What I mean is that when they die, the whole thing starts all over again. I want everyone to be at the same pace. NeonicPlasma 181 — 8y
0
Where is this script located in your game? Is it in the player or the workspace? ClassicTheBlue 65 — 8y
View all comments (9 more)
0
In the workspace. NeonicPlasma 181 — 8y
0
Then it should work like you want (I'm still not sure what you are trying to achieve). I'm online right now we could party and try to figure your script out. ClassicTheBlue 65 — 8y
0
I just joined one of your games, come on if you want to try to figure it out. ClassicTheBlue 65 — 8y
0
Okay. NeonicPlasma 181 — 8y
0
Hey dude, can't message you since we aren't friends. This time I am moving onto the next step of my game. Teleporting players. I used the wiki, videos, asked a question, didn't work! I am so stuck. Could you help? NeonicPlasma 181 — 8y
0
Got that, didn't work. Go to this link to answer my question about it: https://scriptinghelpers.org/questions/21803/why-wont-this-script-work NeonicPlasma 181 — 8y
0
I got the error for the teleportation script. Go to the above link to see it. NeonicPlasma 181 — 8y
0
@awesome NeonicPlasma 181 — 8y
Ad

Answer this question