This is really confusing because when i did a similar situation as you, it worked. Try loading the animation on the humanoid instead of the animator, because that was pretty much the only difference between my experiment and your code i think.
Is the tool script a local script? Because it seems that you defined the player with
game.Players.LocalPlayer
Which you shouldnât do in a normal script. And even if it is a local script, the server wouldnât be able to detect the animation because you ran it locally so you should change it to a normal script.
Do this:
Omg that fixed it! Thank you!! Could you perchance explain what the difference is between Localscript and script? Why does script have the ability to detect the animation?
Because local scripts only run on the client (The players computer). it doesnât run on the server. for example if you tried to kill someone with a local script, then the player would only die on your screen. If you change something on a local script then that change would only effect your computer and not the server running the game. If a cheater changed their speed to 50, their computer will allow it so they can run fast, but the server still registers that the player has 16 (default speed) because the cheater changed a property on their computer and not on the server.