cbhusker
|
  |
| Joined: 07 Feb 2011 |
| Total Posts: 517 |
|
|
| 03 Aug 2015 12:57 PM |
-- Round Script, By Cbhusker. players = game.Players.NumPlayers --minplayers = 2
w = workspace wait(10) while true do if game.Players.NumPlayers >= 1 then -- START GAME countdown = 30 h = Instance.new("Hint", workspace) while countdown >0 do countdown = countdown -1 h.Text = ("Next game starts in "..countdown.."seconds!") wait(1) end local find = game.Players:GetChildren() if find then for i = 1, #find do h.Text = ("Teleporting to the Game!") local x = workspace.START.Position.X local y = workspace.START.Position.Y + 2 local z = workspace.START.Position.Z local target = CFrame.new(x,y,z) find[i].Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0) find[i].Character.Humanoid.WalkSpeed = 0 timer = 3 h.Parent = game.Workspace h.Text = "Ready?" wait(1) h.Text = "3" wait(1) h.Text = "2" wait(1) h.Text = "1" wait(1) h.Text = "GO!" find[i].Character.Humanoid.WalkSpeed = 50 function onTouchedFirst(plr) local found = plr.Parent:FindFirstChild("Humanoid") if found then h:Destroy() print(plr.Parent.Name.."Touched First!") local allplayers = game.Players:GetChildren() for i = 1, #allplayers do local xlose = workspace.endpartlose.Position.X local ylose = workspace.endpartlose.Position.Y + 2 local zlose = workspace.endpartlose.Position.Z local target = CFrame.new(xlose,ylose,zlose) allplayers[i].Character.Torso.CFrame = target + Vector3.new(0, i * 5,0) --tp spawn allplayers[i].Character.Humanoid.WalkSpeed = 16 local h = Instance.new("Hint",workspace) h.Text = "The Game is Over, and The Winner is." wait(0.33) h.Text = "The Game is Over, and The Winner is.." wait(0.33) h.Text = "The Game is Over, and The Winner is..." wait(0.34) h.Text = (plr.Parent.Name.."!") wait(5) h:Destroy() end end end end end w.FINISHblock.Touched:connect(onTouchedFirst) end end
I have a problem. I have this script.
It waits 10 seconds then starts the 30 second countdown, then it teleports players to the game. the game starts then people race to the finish line. the first person to touch the line wins. it then teleports everyone out of the game back to the lobby. it announces the winner. this is how it should work. -- This is what it does: waits 10 seconds 30 second countdown tp players to game game starts first person wins tps out announces winner then it says "GO", not teleporting anyone into the game. if you need to see for yourself...
http://www.roblox.com/games/258447478/Cbhuskers-Place-Number-128
print("Hello World!") |
|
|
| Report Abuse |
|
cbhusker
|
  |
| Joined: 07 Feb 2011 |
| Total Posts: 517 |
|
| |
cbhusker
|
  |
| Joined: 07 Feb 2011 |
| Total Posts: 517 |
|
|
| 03 Aug 2015 03:42 PM |
Buwumps.
print("Hello World!") |
|
|
| Report Abuse |
|