So I have some music playing and i want it to loop almost perfectly. I found a place where if I make the Time Position this certain time right after the music almost done playing. I make a LOCAL SCRIPT Inside the Sound/Audio.
local OutsetIsland = script.Parent local OITP = OutsetIsland.TimePosition if OITP == 119 then OITP = 13 end
For some reason it doesn't do anything when the Audio Time Position hits 119 and there are no errors. Please help, thank you.
I'm assuming this is the entire script.
When this code is run, it will check if the the timeposition is 119, and it will only check once. It does not wait until the timeposition is 119. Make it check every ~0.5 seconds to see if the timeposition is 119 or greater.
Additionally, on line 5, the script is setting the variable OITP
to 13, not the property the variable represents.
On a side note, there is no need for those variables. You're only using each variable once or twice and aren't using them in a situation where you actually need a variable; you aren't really saving any time or effort.