Currently attempting to have my Rig play its animation. At the timing of the hammer hitting the anvil, I want my particles to show AT THAT EXACT TIME. Due to the fact, I don’t think my script coding can be active during the animation because it’s welded with the dummy while it’s being animated.
How would I want my hammer have a script that can determine when the hammer hits the exact moment it touches the anvil?
https://gyazo.com/befd7444d83c63ddb2753d76cb680d9d
tlr22
(FusionOak)
August 31, 2019, 5:22pm
#2
I think it will be easiest to use this AnimationTrack | Documentation - Roblox Creator Hub
But I’ve never tried animating, so I don’t know how to insert them into an animation.
kenami
(kenami)
August 31, 2019, 5:44pm
#3
Hi, Since you’re using Moon Animation, the name of what you’re looking for is quite different, but yes, it’s the same behavior as KeyFrame
On the timeline, you have to Add a Label, the Slider is the Timeline’s top
To make any change to the created Label, double click on it
Rename your label to whatever action the character is doing at this moment
Then, as tlr22 linked, this is the way you can detect what Label(Keyframe) has been passed while the animation was played
local animTrack = humanoid:LoadAnimation(anim)
animTrack:GetKeyframeReachedSignal("HammerHit"):Connect(function(value)
print(value)
end)
Hope this helps
2 Likes
Thank you so much, this was a helpful comment.