Like this?

animation.AnimationId = "5"
animTrack = humanoid:LoadAnimation(animation)

kf = animTrack.KeyframeReached:connect(function(keyframe)
	if keyframe == 2 then
		print("inserting into hole")
	end
end)

2 comments

0

The method KeyframeReached, its paramater is a string

0

?