So, i have this tool in my game, when i equip it it should play the idle anim, and it does, only problem is that the torso is not animated, its frozen
the script works that on tool equip it disables the animate and enables the pistolAnims script.
So, i have this tool in my game, when i equip it it should play the idle anim, and it does, only problem is that the torso is not animated, its frozen
the script works that on tool equip it disables the animate and enables the pistolAnims script.
Try adding the idle animation to the torso as well? The movement to be specific.
what do you mean by adding the idle animation to the torso?
I mean by animating the idle animation just like you animated the torso.
Sorry wasn’t at home.
The torso is already animated.
I have this idle animation:
And this is how it plays on tool equip:
the idle without the tools works, but not the idle with tool.
It seems that there is another animation overriding it, can I see the code?
what animation priority did you set it to? The tool you hold out has a default animation, which my guess overrides the torso keyframes for the idle animation.
Can’t send it rn, but basically I have 2 copies of Animate script in StarterCharacterScripts, one is for normal animations with no tools, the other one is for the pistol tool, the code basically disables the normal animations and enables the pistol animations + it updates the character with a line of code I can’t remember rn. The thing you could tell me maybe is that it creates another Animate, and that’s true, I tried deleting it, but the problem didn’t go away.
All the animations are set to Action
As soon as Im back home I’ll try to change the priority.
local normalAnims = chr.normalAnims
local pistolAnims = chr.pistolAnims
-- Equip event
tool.Equipped:Connect(function()
normalAnims.Enabled = false
pistolAnims.Enabled = true
chr.Humanoid:ChangeState(Enum.HumanoidStateType.Running)
ammoGui.Enabled = true
equipped = true
ammoGui.Ammo.Text = ammo.."/"..maxAmmo
end)
-- Unequip event
tool.Unequipped:Connect(function()
normalAnims.Enabled = true
pistolAnims.Enabled = false
chr.Humanoid:ChangeState(Enum.HumanoidStateType.Running)
ammoGui.Enabled = false
equipped = false
end)
here the part that enables/disables the animations.
Set the idle animation priority to Action.
It’s stupid that setting it to Idle doesn’t override the animation but IIRC Action is the priority that overrides this.
If you would not like to do this you can edit out the default animation using this tutorial.
(Keep in mind this will affect EVERY tool in your game unless you add extra logic to the Animate script)
is it possible that the handle is making this happen?
this is how it’s made, if i rename the part to something else and set this to false:
animations works, torso and arm moves. Only problem the tool wont stay in the hand, it appears on the floor
You would have to weld the handle to the players hand yourself afterwards.
If you’re using animated handles using something like xSIXs’s Motor6D tool script then it should automatically do this for you.
i avoided this thing for long time for the “complexity”, i guess i have to do it now.
Again, you can use the previous methods such as setting the priority to Action instead of Idle.
Simplicity is usually the best option in cases of game development.
already tried, not working, tried to set it to idle, action, action 2, action3, action4, doesnt work