|
| 16 Feb 2016 07:11 PM |
This is just a small script I made (wanting to eventually make a game script) but I was wondering how to make it loop? I haven't been scripting very long, just about a week or two, so I don't really understand how to make a script do something repeatedly yet. Everything else in the script works right now though. Here is the script:
h = Instance.new('Hint') h.Parent = game.Workspace c = 25 g = 25 h.Text = "The next round will start in " ..c.. " seconds!"
while true do wait(1) c = c - 1 h.Text = "The next round will start in " ..c.. " seconds!" if c == 0 then wait(.01) h:Remove() a = Instance.new('Hint') a.Parent = game.Workspace a.Text = "The round will end in " ..g.. " seconds!" target = Vector3.new(49, 100.5, 77) for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 10, 0)) while true do wait(1) g = g - 1 a.Text = "The round will end in " ..g.. " seconds!" if g == 0 then wait(.1) a:Remove() target = Vector3.new(6.6, 6.5, 22.8) for i, v in pairs(game.Players:GetChildren()) do v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 10, 0)) end end end end end end
|
|
|
| Report Abuse |
|
|
|
| 16 Feb 2016 07:16 PM |
You might wanna go to scripter's forum for that there buddy :P
"All Hail floaty red brick" |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2016 07:40 PM |
I didn't go there cause it says no help requests :/
|
|
|
| Report Abuse |
|
|
|
| 16 Feb 2016 07:56 PM |
| i think all you need to do is move the line that says "while true do" to the top of the script so that the loop includes repeating the round will start hint. |
|
|
| Report Abuse |
|
|
|
| 16 Feb 2016 07:57 PM |
| also, this makes me miss the scripting helpers forum :( |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 16 Feb 2016 08:25 PM |
| The Scripters forum desc. says it doesn't take help requests, but in reality, it does. There's no other good place to put requests. If you feel unsure about it, use an alt. |
|
|
| Report Abuse |
|
|
| |
|