I’m trying to make a gun so whenever you equip it, it plays an animation. It works perfectly fine you can equip and unequip it and it will start/stop playing the same animation.
The only issue is, is that my hand still goes out like the animation isn’t affecting the right arm.
What it looks like:
What it should look like:
Script to play animations:
local armed = false
local armedAnim
local char
tool.Equipped:Connect(function()
armed = true
char = tool.Parent
armedAnim = char.Humanoid:LoadAnimation(script.Parent.Animations.Armed)
armedAnim:Play()
armedAnim.Looped = true
end)
tool.Unequipped:Connect(function()
armed = false
if armedAnim ~= nil then
armedAnim.Looped = false
armedAnim:Stop()
armedAnim = nil
char = nil
end
end)
What am I doing wrong? I set the priority of the animation to Idle for those who are wondering.