when I play an animation it stops instantly
code: `script.Parent.MouseButton1Click:Connect(function()
local animation = Instance.new(“Animation”)
animation.AnimationId = “http://www.roblox.com/asset/?id=”…script.Parent.Parent.Animation.Value
local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()
local animationTrack = character.Humanoid:LoadAnimation(animation)
animationTrack:Play()
animationTrack.Looped = true
print("playing "..script.Parent.Parent.Animation.Value)
end)
robloxapp-20231118-1434178.wmv (864.8 KB)
`