|
| 02 Apr 2016 10:30 PM |
I have a script that plays music to the winners of a round in my game, and after 7 seconds the music stops. The only problem is that the music doesn't stop... Can anyone help with this?
function BlueWins() for i,v in next, game.Players:GetPlayers() do if v.TeamColor == BrickColor.new("Dark blue") then v.PlayerGui.ScreenGui.Victory:Play() elseif v.TeamColor == BrickColor.new("Deep orange") then v.PlayerGui.ScreenGui.Defeat:Play() wait(7) if v.TeamColor == BrickColor.new("Dark blue") then v.PlayerGui.ScreenGui.Victory:Stop() elseif v.TeamColor == BrickColor.new("Deep orange") then v.PlayerGui.ScreenGui.Defeat:Stop() end end end end
|
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 10:33 PM |
function BlueWins() for i,v in next, game.Players:GetPlayers() do if v.TeamColor == BrickColor.new("Dark blue") then v.PlayerGui.ScreenGui.Victory:Play() elseif v.TeamColor == BrickColor.new("Deep orange") then v.PlayerGui.ScreenGui.Defeat:Play() end wait(7) for i,v in pairs(game.Players:GetPlayers()) do if v.TeamColor == BrickColor.new("Dark blue") then v.PlayerGui.ScreenGui.Victory:Stop() elseif v.TeamColor == BrickColor.new("Deep orange") then v.PlayerGui.ScreenGui.Defeat:Stop() end end end end end
I'm not sure I put enough ends, check on that. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 10:37 PM |
| You added an additional end. Time to see if it works... |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 10:46 PM |
| It worked fine. It caused some difficulties towards the end of the script, But I'm sure I can fix those. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2016 10:51 PM |
| Alright, glad to help. If you need help on that end part, just tell me the problem, I can try to fix it |
|
|
| Report Abuse |
|
|