Play is not a valid member of animation?

Hey! I’m having trouble with my script. I am trying to make a tool that loads an animation when you click your left mouse button. Also, I know this sounds pretty easy, but I only have 3 weeks of scripting experience.

Here is my script.

You’d have to load the animation in order to play it:

Example:

local Humanoid = game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid") -- Just an easier way to get humanoid
local Animation = Humanoid:LoadAnimation(script.Parent:WaitForChild("AnimationThing") -- Loads animation first

Animation:Play() -- Plays animation
4 Likes

Thanks for the help! Well appreciated!

If you’re new to animations then I suggest you take a look at this tutorial: