Animation not playing when having the tool equipped

Need help with my code to see why my Animation isn’t playing.(An Idle to be specific) I also already changed the priority and activated looping. Also if you have better tips on how I can organize this I would like to hear them.

The Code:


LocalScript:
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEvent = ReplicatedStorage:WaitForChild("Stick")

local Tool = script.Parent

Tool.Equipped:Connect(function()
	
	RemoteEvent:FireServer()
	
end)

ServerScript:

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEvent = ReplicatedStorage.Stick

local Debounce = false

local Animation = Instance.new("Animation")

local StickIdle = "http://www.roblox.com/asset/?id=5072046182" local StickCom1 = "rbxassetid:5083926093" local StickCom2 = "rbxassetid:5083965419" local StickCom3 = "rbxassetid:5084008095"

local StickAnimations = {StickIdle,StickCom1,StickCom2,StickCom3}

RemoteEvent.OnServerEvent:Connect(function(Player)
	
	Animation.AnimationId = StickIdle
	
	local Char = Player.Character
	
	local Humanoid = Char.Humanoid

	local AnimationTrack = Humanoid:LoadAnimation(Animation)
	
end)

You’ve loaded the animation but you haven’t played it.

local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
1 Like

I am baffled at the fact that I forgot your suppose to play the animation. Thank you

1 Like

Lol, it’s alright we all make small mistakes. glad i could be of help.

1 Like