For some reason this is not working, the following is inside a local script.
tool.Equipped:Connect(function()
local animator = game.Players.LocalPlayer.Character.Humanoid.Animator
animator:LoadAnimation(tool.Animator.Equip):Play()
end)
The animation itself is inside a folder which is inside the tool itself which is being equipped, not sure why it’s not loading. I tried debugging by printing the animator and the animation, however both returned the correct instances, so it must be a problem with the ‘animator:LoadAnimation()’. Any help is appreciated, thanks.
Equip is just the animation’s name, and the Animator as seen in the loadanimation parameters is the folder which it’s in. The animator which loads the animations is still in it’s usual place within the humanoid. Thank you for trying to help me
I think I know the solution, as I faced something exactly like it.
Unless there are errors in the code, you might want to check whether the animation is R6 or R15 and then change your game settings to load in characters like that.
The problem was for some reason caused by the animation itself, for some reason ROBLOX didn’t like the fact that we were uploading the animation on the same team create game that it was being made on.
In the end, we had to upload the animation on a separate, non-team create place and then the animation worked.