#how to load animation on a player? helpp.....

1 messages · Page 1 of 1 (latest)

brittle lantern
#

local animId = "rbxassetid://111933425067630" 

local function playAnimation(character)
    local humanoid = character:WaitForChild("Humanoid")
    local animator = humanoid:FindFirstChildOfClass("Animator")
    if not animator then
        animator = Instance.new("Animator")
        animator.Parent = humanoid
    end
    local animation = Instance.new("Animation")
    animation.AnimationId = animId

    local track = animator:LoadAnimation(animation)
    track.Priority = Enum.AnimationPriority.Action 
    track:Play()
end
Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        playAnimation(character)
    end)
end)
dim lion
#

whats the problem exactly?

brittle lantern