does anyone know why my animations are not playing, no error and it prints 1 it jsut doesnt play
function playAnimation(id)
local hum : Humanoid = char:WaitForChild("Humanoid")
local animator
if not hum:WaitForChild("Animator") then
animator = Instance.new("Animator")
animator.Parent = hum
else
animator = hum:WaitForChild("Animator")
end
local animation = Instance.new("Animation")
animation.AnimationId = id
local track = animator:LoadAnimation(animation)
track:Play()
print(1)
end