#I have a problem with my animations for characters the error says -attempt to call a nil value

7 messages · Page 1 of 1 (latest)

silent dagger
#
    local humanoid = object:WaitForChild("Humanoid")
    local animationsFolder = object:WaitForChild("Animations")
    
    if humanoid and animationsFolder then
        local walkAnimation = animationsFolder:WaitForChild("Walk")
        if walkAnimation  then
            local animator = humanoid:FindFirstChild("Animator") or Instance.new("Animator", humanoid)
            local walkTrack = animator:LoadAnimation(walkAnimation)
            walkAnimation:Play()
        end
    else
        warn("No humanoid/animation folder for", object.Name)
    end
end

workspace.Mobs.ChildAdded:Connect(animateMob
)```
#

hi

#

hi

#

it now says this

#

Play is not a valid member of Animation "Workspace.Mobs.Zombie.Animations.Walk"

#

nvm

#

I solved it