Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function animateMob(object)
- 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)
- walkTrack:Play()
- end
- end
- end
- workspace.Grassland.Mob.ChildAdded:Connect(animateMob)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement