You could use AnimationEvent’s to sync up sounds with animations with this signal.
https://developer.roblox.com/en-us/api-reference/function/AnimationTrack/GetMarkerReachedSignal
How to create an AnimationEvent:
-
Go into the Animation editor.
-
Right click anywhere on the timeline and click “Create Animation Event”
-
Call the Animation Event anything you want so we can reference it later in a script, then click save.
Great! Now we have our Animation Event. You can drag this AnimationEvent anywhere you want in the Animation timeline to time whenever it’s going to happen. Now you can use GetMarkerReachedSignal to play the sound whenever it reaches the point we put it at in the Animation timeline.
Here’s a quick example:
Animation:GetMarkerReachedSignal("Animation Event name"):Connect(function()
print("Marker reached.")
--Play the sound
end)