Is there a way to hold gear with two hands? I dont have any idea how.
You would need to make an animation with the animation priority set to Action
.
i dont know how iam gonna play it
It would look something like this:
local Tool = script.Parent
local Animation = Tool.Animation
local AnimationTrack
Tool.Equipped:Connect(function()
AnimationTrack = Tool.Parent.Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
end)
Tool.Unequipped:Connect(function()
if AnimationTrack then AnimationTrack:Stop() end
end)
Devforum won’t let me indent, sadly…
You don’t have to loop it. You can just pause it after around 0.1 seconds, then when it’s unequipped, stop the animation.
More here: AnimationTrack | Documentation - Roblox Creator Hub
Check the output for error(s). I can’t see anything wrong with the code I provided, so it’s unlikely to be that. Make sure your animation has at least two keyframes at different times in total.
[19:38:16.351 - Animation is not a valid member of Tool]
Yeah simply switch out this line with:
local Animation = Tool:WaitForChild("Animation")
It works! thanks so much! sorry for wasting your time
As long as I was helpful to you, my time was not wasted.
Does your hand go up when walking? Mine does and I can’t seem to fix it.
This happens because you don’t have a keyframe for the hand.
To overwrite joints each joint will need respective keyframes as well as be part of an animation with a higher animation priority than the other ones playing (e.g. core animations such as walking, idling, jumping, etc.)
The “action” animation priorities (1 through 4) are usually safe to use in order to overwrite these animations.
Wouldn’t it be more optimal to state “AnimationTrack.Looped=true”?