When I press left click, the game detect it, but doesn't play it. This is my first animation, plis, help me.
local Player = game.Players.LocalPlayer
Character = script.Parent
local Mouse = Player:GetMouse()
Mouse.Button1Down:connect(function(Punch) --it works--
local Punch1 = script:FindFirstChild("Punch1")
Punch1.AnimationId = "rbxassetid://5436382797"
local Humanoid = Character:FindFirstChild("Humanoid").LoadAnimation
if Humanoid then
local AnimationTrack = Punch:LoadAnimation() --there is the problem --
AnimationTrack:Play()
return AnimationTrack
end
end)

2 comments
I dont think you need the if humanoid statement, also, where is the local script located?
This local script is the children of an Player.Character