How do i sync sound with animtion

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:

  1. Go into the Animation editor.

  2. Right click anywhere on the timeline and click “Create Animation Event”
    image

  3. Call the Animation Event anything you want so we can reference it later in a script, then click save.
    image

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.
image

Here’s a quick example:

Animation:GetMarkerReachedSignal("Animation Event name"):Connect(function()
	print("Marker reached.")
    --Play the sound
end)
14 Likes