I am trying to duplicate an audio and ensure that all of the properties of the cloned audio are always in sync with the original audio. It works almost fine however whenever an audio loops, the cloned audio becomes out of sync.
Here is some relevant code:
--clone the audio
local Archivable = Sound.Archivable
Sound.Archivable = true
local SoundClone = Sound:Clone()
SoundClone.SoundGroup = game:GetService("SoundService").Game
SoundClone.Parent = Attachment
ChangeConn = Sound.Changed:Connect(function()
task.spawn(function()
SoundClone.Playing = Sound.Playing
SoundClone.TimePosition = Sound.TimePosition
SoundClone.Volume = Sound.Volume
SoundClone.RollOffMaxDistance = Sound.RollOffMaxDistance
SoundClone.RollOffMinDistance = Sound.RollOffMinDistance
SoundClone.RollOffMode = Sound.RollOffMode
SoundClone.Looped = Sound.Looped
SoundClone.PlaybackSpeed = Sound.PlaybackSpeed
end)
end)
I have also tried setting the Timeposition frequently to no effect. Any ideas?