Local Animation Not Playing

I’ve only ever made one animation before and that was in a server script. I tried to make a animation that would play on the player however it isn’t running. I have used the DevHub tutorial on this and recycled some of the code form my other animation.

local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
local animator = humanoid:WaitForChild("Animator")

script.Parent.MouseButton1Click:Connect(function()
    local Animation = script.Parent.Parent.Animations.Wave
    local AnimationTrack = animator:LoadAnimation(Animation)
    AnimationTrack:Play()
end)

Thanks in advance for any Help.
ICrann

perhaps you should try this?

local animator = humanoid:FindFirstChildOfClass("Animator")
if animator then
	local animationTrack = animator:LoadAnimation(animation)
	animationTrack:Play()
end

No sorry doesn’t work. Doesn’t even bring up an error.

One mistake I did a while ago was make a R15 animation, but my character was R6. So the animation didn’t play nor did it error, I would check that your avatar is the correct R for your animation.

2 Likes

Yes it is, but thanks for pointing it out.

Oh god I figured it out.

For testing I was using roblox animations which for some reason you can’t use. So I fixed it by making a new animation.

Thanks to everyone who helped.