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

Script Won't return to back to the lobby?

Asked by 7 years ago

Hello I have a problem with my roundscript It is a really big script so I will show you a piece of it Btw when I set players to 1 (not 2) it works (In roblox studio) But when I set players to 2 it won't work.

01status.Value = "Be The Last Standing!"
02if status.Value then
03    game.Workspace.Sound:Stop()
04end
05wait(4)
06for i = 196,0,-1 do -- You can adjust the #196 to how long you want the round to last.
07    if i == 0 then
08        status.Value = "Time is up!"
09        wait(3)
10        break
11    end
12    wait(1)
13    if #_G.gameplayers == 1 then
14        for i, v in pairs(_G.gameplayers) do
15            if v ~= nil then
View all 39 lines...

I used this script so they would teleport to the lobby ~~~~~~~~~~~~~~~~~ for i, player in ipairs(game.Players:GetPlayers()) do if player.Character then local hum = player.Character:FindFirstChild('Humanoid') if hum then hum.Health = 0 end end end ~~~~~~~~~~~~~~~~~ Every thing in the script works except that they will return to the lobby. Any solutions?

1 answer

Log in to vote
0
Answered by 7 years ago

Lines 16 and 17. Change [v] to [v.Name] and v.Name.."Has won"

0
Didn't work :( thebigwalkingdoor 0 — 7y
Ad

Answer this question