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: Music script help

Previous Thread :: Next Thread 
FearPatty is not online. FearPatty
Joined: 17 Mar 2011
Total Posts: 564
27 May 2015 03:35 PM
Alright. I created a music script about 9 months ago and it works fine for me. It plays a song, tells what song it is via the message command thingie, and repeats that action with the other songs I have after the first song is done. However, everyone that hears it in action at my place complains that it plays two songs at once occasionally. It doesn't play two songs at once for me, though. This is the script:

red = 1

function Sound()
repeat
local Alert = Instance.new("Hint", game.Workspace)
Alert.Text = "Now Playing: Autumn"
local sound = Instance.new("Sound", game.Workspace)
sound.SoundId = "http://www.roblox.com/asset/?id=185224422"
sound:Play()
wait(110)
sound:destroy()
Alert:destroy()
local Alert = Instance.new("Hint", game.Workspace)
Alert.Text = "Now Playing: Bring to Life"
local sound = Instance.new("Sound", game.Workspace)
sound.SoundId = "http://www.roblox.com/asset/?id=185224525"
sound:Play()
wait(120)
sound:destroy()
Alert:destroy()
until red == 2
end

Sound()

I really don't know what the problem is. Anyone have a clue what it is?
Report Abuse
FearPatty is not online. FearPatty
Joined: 17 Mar 2011
Total Posts: 564
27 May 2015 03:39 PM
Pls bbys
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
27 May 2015 03:42 PM
Please don't use hints.
Switch over to using DidLoop event to switch songs.



-𝒩 | Anticodist, Scripter
Report Abuse
FearPatty is not online. FearPatty
Joined: 17 Mar 2011
Total Posts: 564
27 May 2015 03:56 PM
I don't know what the didloop event is :P. Elaborate please
Report Abuse
Anticodist is not online. Anticodist
Joined: 05 Feb 2014
Total Posts: 1191
27 May 2015 03:57 PM
Gladly! Once a song loop, the event fires and you can do anything based off of that. My game "Building[Demo]" utilizes this event if you want to see it in action. However, here is the documentation:
http://wiki.roblox.com/index.php?title=Sound



-𝒩 | Anticodist, Scripter
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