generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Question

Previous Thread :: Next Thread 
Colin_Gallagher is not online. Colin_Gallagher
Joined: 15 Feb 2017
Total Posts: 1154
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
ExpensiveGaming is not online. ExpensiveGaming
Joined: 01 Apr 2013
Total Posts: 783
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
Colin_Gallagher is not online. Colin_Gallagher
Joined: 15 Feb 2017
Total Posts: 1154
02 Apr 2016 10:37 PM
You added an additional end. Time to see if it works...
Report Abuse
Colin_Gallagher is not online. Colin_Gallagher
Joined: 15 Feb 2017
Total Posts: 1154
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
ExpensiveGaming is not online. ExpensiveGaming
Joined: 01 Apr 2013
Total Posts: 783
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image