|
| 06 Jan 2012 05:23 PM |
text = game.StarterGui.Message.Frame.Hint
while true do text.Text = "Waiting for next round..." wait(12) text.Text = "Get ready!" wait(3) text.Text = "5..." wait(1) text.Text = "4..." wait(1) text.Text = "3..." wait(1) text.Text = "2..." wait(1) text.Text = "1..." wait(1) text.Text = "Begin!" wait(5) end
It works fine in studio mode. When I play the game, it doesn't do anything.. it doesn't change. Why? |
|
|
| Report Abuse |
|
|
Grove537
|
  |
| Joined: 05 Feb 2010 |
| Total Posts: 3478 |
|
|
| 06 Jan 2012 05:24 PM |
| Since it's a gui, you need to go into every player's PlayerGui and change it, or they won't see it change until they respawn. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 06 Jan 2012 05:28 PM |
| (Just noticed you're one day older than me. o.e) |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2012 05:29 PM |
You'll notice that it only changes the text in the Hint placed in game.StarterGui. This means.. Depending on when your character respawns, you get a different text. But as long as your character is alive, you will be stuck with one specific text.
Try this:
while true do for _, plyrs in pairs(game.Players:GetChildren()) do if plyrs and plyrs.PlayerGui.Message.Frame:FindFirstChild("Hint") then local text = plyrs.PlayerGui.Message.Frame.Hint text.Text = "Waiting for next round..." wait(12) text.Text = "Get ready!" wait(3) text.Text = "5..." wait(1) text.Text = "4..." wait(1) text.Text = "3..." wait(1) text.Text = "2..." wait(1) text.Text = "1..." wait(1) text.Text = "Begin!" wait(5) end end
Though.. I see a potential problem with this. Let me test it. |
|
|
| Report Abuse |
|
|
| |
|
|
| 06 Jan 2012 05:34 PM |
Needed an end. Testing it again.
Nope. |
|
|
| Report Abuse |
|
|
|
| 06 Jan 2012 05:37 PM |
| But I don't see what you're trying to do with the script (well, obviously you're changing the text of a GUI..). Why don't you just hook-up the text-changing with your round-script? |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 06 Jan 2012 05:42 PM |
while true do for _, plyrs in pairs(game.Players:GetChildren()) do if plyrs and plyrs.PlayerGui.Message.Frame:FindFirstChild("Hint") then local text = plyrs.PlayerGui.Message.Frame.Hint text.Text = "Waiting for next round..." wait(12) text.Text = "Get ready!" wait(3) text.Text = "5..." wait(1) text.Text = "4..." wait(1) text.Text = "3..." wait(1) text.Text = "2..." wait(1) text.Text = "1..." wait(1) text.Text = "Begin!" wait(5) end end end |
|
|
| Report Abuse |
|
|