When I change the sound id of a sound in sound service then set its time position to 0, it doesn’t reset. I tried stopping it ( audio:stop() ) and then starting it again and that didn’t even work. need some help.
Let me explain more. The music.val is a number value parented in the sound instance in sound service for a mute button to work, it has nothing to do with time position.
map3.music is a sound id itself from a module script containing maps, map sound ID’s and volumes for those sounds.
The script I wrote above is changing the music sound id (in sound service) to a new ID returned from a module.
--Set the sound ID, and then:
sound:Stop()
sound.TimePosition = 0
--Whatever other tweaks you need to do
sound:Play()
I’m not super familiar with sounds, but it seems like your timeposition change is probably happening, but another script ignores it and moves the time along while the sound is playing.