I've tried doing this before when a player clicks a part but I don't understand how. I also tried making a script where an animation will play when a player clicks with a tool but it failed as well. On the wiki it says LoadAnimation is deprecated? How would I do this?
Firstly, put a Script and ClickDetector in the part then, inside the script type:
script.Parent.ClickDetector.MouseClicked:Connect(function() -- [ this is just a example of how to load the animation ] local animationTrack = humanoid:LoadAnimation(animation) animationTrack:Play() -- [ this is just a example of how to load the animation ] end)
Sorry for the bad formatting on mobile