|
| 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
|
  |
| 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 |
|
|
|
| 14 Jul 2015 01:58 PM |
| All songs are parented by the script. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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 |
|
|