Hi, im trying to play an animation when the player clicks, but nothing is happening. There is also no output.
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
local anim = Instance.new("Animation")
anim.AnimationId = "http://www.roblox.com/Asset?ID=2309234897"
local char = plr:WaitForChild("Character")
local equipped = false
local tool = script.Parent
mouse.Button1Down:Connect(function()
if equipped == true then
local animTrack = char.Humanoid:LoadAnimation(anim)
animTrack:Play()
wait(2)
end
end)
tool.Equipped:Connect(function()
equipped = true
end)
tool.Unequipped:Connect(function()
equipped = false
end

4 comments
Do you have the animation published? aka Exported?
Yes i uploaded it
Is it a local or a normal script?
Local script in a tool