Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My Walk Animation Will Not Play?

Asked by 3 years ago

Well, I Made This Script Were It Makes The NPC Walk But It Doesn't Play Animation.


EventTable.Walk.Event:Connect(function(Character) local Animations = { wAnim = "rbxassetid://2510238627", iAnim = "rbxassetid://251023506" } local humanoid = Character.Humanoid local animationA = Instance.new("Animation", Character) animationA.AnimationId = Animations.wAnim animationA.Name = "Walk" local animationB = Instance.new("Animation", Character) animationB.AnimationId = Animations.iAnim animationB.Name = "Idle" local WalkAnimTrack = humanoid:LoadAnimation(animationA) local IdleAnimTrack = humanoid:LoadAnimation(animationB) local Points = Position.WalkOutside for i,v in pairs(Points:GetChildren()) do IdleAnimTrack:Play() Character.Humanoid:MoveTo(v.Position) IdleAnimTrack:Stop() WalkAnimTrack:Play() Character.Humanoid.MoveToFinished:Wait() IdleAnimTrack:Play() WalkAnimTrack:Stop() end animationA.Parent = workspace.GameBins animationB.Parent = workspace.GameBins end)

1 answer

Log in to vote
0
Answered by 3 years ago

Any errors? If none, check the animation priority.

Ad

Answer this question