GetMarkerReachedSignal yielding indefinitely

I have been trying out the example posted on the wiki after finding out that KeyframeReached has been replaced by it. You can find the example at the bottom of the page here:

However when I try to use it with one of my existing animations that worked with KeyframeReached before it simply yields the code and doesn’t continue.

1 Like

Need actual code to go off of. There’s insufficient information provided to be able to offer you any help here.

The code is on the bottom of the wiki page I linked in my original post minus the animation id which has been replaced by one of my own with an animation that I had previously used perfectly fine with the KeyframeReached event. Since reading a post can be very strenuous to some I will do them a solid and paste the code here:

local player = game.Players:GetChildren()[1]
local character = game.Workspace:WaitForChild(player.Name)
local humanoid = character:WaitForChild("Humanoid")
 
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://437855404"
local animTrack = humanoid:LoadAnimation(anim)
 
animTrack:GetKeyframeReachedSignal("FootStep"):Connect(function(value)
print(value)
end)
animTrack:Play()

GetKeyframeReachedSignal is not a valid function of an AnimationTrack. You should’ve gotten this error when you attempted to use this. The proper function is KeyframeReached and the animation you’re working with is for keyframe reached, not keyframe markers.

Keyframe names and markers are not interchangeable. Marker reached signals will not fire for keyframe names, as they do not have markers. KeyframeReached, likewise, will not fire for a marker, rather for every keyframe it gets to.

Thank you, I’m just baffled as to why someone put it on the wiki.

1 Like

May I suggest that you consider raising a bug report for this as it does look wrong.