hi there,
I’m trying to create some code that changes all of the animations of a player when they equip a tool.
I already have code that changes the idle animation of a player when they hold it out, and the walk animations do work since I didn’t save keyframes for those body parts, but ideally the script would be able to load animations for running, jumping, swinging, ect. with the weapon all in one script.
the code I already have:
tool.Equipped:Connect(function()
weldEvent:FireServer(bodyAttach,false)
track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
track.Priority = Enum.AnimationPriority.Idle
track.Looped = true
track:Play()
end)
tool.Unequipped:Connect(function()
if track then
weldEvent:FireServer(bodyAttach,true)
track:Stop()
end
end)
its pretty ubiquitous. I’m just not entirely certain how to expand from it to load different animations for different player actions, since ive never worked with animations and I could not find any posts addressing how to do this.
im sorry if there are already resources out there on this: I looked far and wide and could not find any. and assistance at all would be greatly appreciated!