|
| 02 May 2016 01:56 PM |
Hello! I Have made a Script that counts down to 0 then Teleports you in game, It then stays in game for 10 sec's and Then breaks your Bones and put you back in the Lobby, That was Working fine, So i added a Repeat to this, and you start as normal in the Lobby for 30 sec's then you get put in game, after 10 sec's it kill's you and puts you back in the Lobby, and is ment to start over again but it doesnt it starts From 10 sec's intead off 30? can someone help me?? Thank's
My Script:
for i=1, 10 do
playersNeeded = 1 whenThereIsEnoughPlayers = function() end
repeat wait(1) until Game.Players.NumPlayers >= playersNeeded whenThereIsEnoughPlayers()
local teleportPart = workspace.Part -- The part to teleport to. local msg = Instance.new("Hint",game.Workspace) msg.Name = "MyTimer" while (true) do for i = 30,0,-1 do msg.Text = tostring(i) wait(1) end msg.Text = "GAME STARTED" for _,p in pairs(game.Players:GetPlayers()) do if (p.Character) then p.Character.Torso.CFrame = teleportPart.CFrame + Vector3.new(-53.124, 0.5, 145.205) end end
while (true) do for i = 10,0,-1 do msg.Text = tostring(i) wait(1) end
wait(1) msg.Text = "Game Over... Waiting for Players" for _,p in pairs(game.Players:GetPlayers()) do if (p.Character) then p.Character:BreakJoints() wait(1) end end end end end wait() |
|
|
| Report Abuse |
|
|
|
| 02 May 2016 02:29 PM |
| anyone No why this is happening? |
|
|
| Report Abuse |
|
|
teapotez
|
  |
| Joined: 12 Nov 2007 |
| Total Posts: 44 |
|
|
| 02 May 2016 02:34 PM |
while (true) do for i = 10,0,-1 do msg.Text = tostring(i) wait(1) end
Why are you looping that?
|
|
|
| Report Abuse |
|
|
Salinas23
|
  |
| Joined: 28 Dec 2008 |
| Total Posts: 37142 |
|
|
| 02 May 2016 02:36 PM |
@tea
cuz that works as a countdown text |
|
|
| Report Abuse |
|
|
teapotez
|
  |
| Joined: 12 Nov 2007 |
| Total Posts: 44 |
|
|
| 02 May 2016 02:36 PM |
Btw it doesnt restart because the script finished.
|
|
|
| Report Abuse |
|
|
teapotez
|
  |
| Joined: 12 Nov 2007 |
| Total Posts: 44 |
|
|
| 02 May 2016 02:37 PM |
He can also use
for i = 10,0,-1 do msg.Text = tostring(i) wait(1) end
Instead of adding the while true do loop.
|
|
|
| Report Abuse |
|
|
|
| 02 May 2016 02:37 PM |
| im not, im looping the whole Thing, That just does the Count Down, i am trying to Loop the whole thing |
|
|
| Report Abuse |
|
|
teapotez
|
  |
| Joined: 12 Nov 2007 |
| Total Posts: 44 |
|
|
| 02 May 2016 02:38 PM |
Then loop the whole script.
|
|
|
| Report Abuse |
|
|
|
| 02 May 2016 02:40 PM |
| Just Fixxed it i used the Script you gave me, Thanks :) |
|
|
| Report Abuse |
|
|
teapotez
|
  |
| Joined: 12 Nov 2007 |
| Total Posts: 44 |
|
| |
|