Hello! Amateur scripter here.
So I’m making a car radio system, and i really want it to be a little more realistic, in that all cars (if on the same station) will play the same song and the same point in the song, if you get what I mean.
With the cars in my game, you can spawn one at any time (it’s cloned from repstorage)
so having individual scripts to control the radio won’t work because they’re spawned at different times.
What I’m trying to do with this, is that in workspace there is a ‘master radio.’ Basically within that there’s a script that chooses the soundid and time and all the little details of a song playlist.
b = script.Parent
b.TimePosition = 0
b.PlaybackSpeed = 0.71
b.SoundId = "http://www.roblox.com/asset/?id=9435835295"
wait(153)
b.TimePosition = 0
b.PlaybackSpeed = 0.71
b.SoundId = "http://www.roblox.com/asset/?id=9479240447"
wait(231)
And there is another script within each car, which is supposed to check the ‘master radio’ and pair it to the details of it to the sound the script is parented to.
b = game.Workspace.MasterRadio.folk
a = script.Parent
wait(30)
a.Playing = true
a.Volume = 1
while true do
a.TimePosition = b.TimePosition
a.SoundId = b.SoundId
a.PlaybackSpeed = b.PlaybackSpeed
end
It works with the first sound, and all that is good, but once the first song finishes it just goes silent and nothing else happens.
I’m fairly confident once i tackle this I’ll be fine with making a change stations script, as I’ll just be using volume of the different audios.
any help would be appreciated