|
| 18 May 2014 01:30 PM |
| If I have a coroutine and a part of the script after the coroutine that is almost the same as the coroutine, how can I cancel what's happening after the coroutine if the coroutine finishes before the script after it and vise versa? |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 01:35 PM |
1.wheres the script bra? 2.learn punctuation plz |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 01:36 PM |
local waiter = coroutine.create(function() repeat wait() until _G.Team1Player.Character.ingame.WalkSpeed == 0 for i,v in pairs(game.Players:GetChildren()) do if v.TeamColor == "Bright red" then v.leaderstats.Wins.Value = v.leaderstats.Wins.Value + 1 end end display("Blue captain has been frozen! Red team wins!") wait(3) display("") script.Name = "gamedone" wait(1) script.Name = "gamelogic" end) coroutine.resume(waiter) repeat wait() until _G.Team2Player.Character.ingame.WalkSpeed == 0
display("") for i,v in pairs(game.Players:GetChildren()) do if v.TeamColor == "Bright blue" then v.leaderstats.Wins.Value = v.leaderstats.Wins.Value + 1 end end display("Red captain has been frozen! Blue team wins!") wait(3) display("") script.Name = "gamedone" wait(1) script.Name = "gamelogic" |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 01:43 PM |
Umm
Since when is WalkSpeed a member of 'ingame'? |
|
|
| Report Abuse |
|
|
|
| 18 May 2014 01:45 PM |
| Sorry about that... I forgot to mention that I've renamed every player's Humanoid to "ingame" :P |
|
|
| Report Abuse |
|
|
| |
|
| |
|