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: RandomSong

Previous Thread :: Next Thread 
BlixBlocker is not online. BlixBlocker
Joined: 24 Dec 2013
Total Posts: 657
14 Jul 2015 01:51 PM
Why isn't this RandomSong script working?
local allsongs = script:GetChildren()
local newsong = allsongs[math.random(1, #allsongs)]:clone()
newsong:Play()
Report Abuse
MisBloxy is not online. MisBloxy
Joined: 13 Sep 2008
Total Posts: 164
14 Jul 2015 01:55 PM
where is the parent of the new song?


Yay I did it :D
Report Abuse
BlixBlocker is not online. BlixBlocker
Joined: 24 Dec 2013
Total Posts: 657
14 Jul 2015 01:58 PM
All songs are parented by the script.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
14 Jul 2015 01:59 PM
"local newsong = allsongs[math.random(1, #allsongs)]:clone()
newsong:Play() "

Doesn't look like they are parented by the script.
Report Abuse
MisBloxy is not online. MisBloxy
Joined: 13 Sep 2008
Total Posts: 164
14 Jul 2015 02:03 PM
u need to set the parent of the new song. because if u just cone it, the song still doesn't exist.
set the son'g parent to the script. the song needs to have a parent for the song to play.


Yay I did it :D
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