#needs to be playing idle animation while waiting

1 messages · Page 1 of 1 (latest)

warm oriole
#

local Animation = script.Parent:LoadAnimation(script.Run)
while true do
script.Parent.WalkToPoint = Vector3.new(script.Parent.Parent.HumanoidRootPart.Position.X-math.random(-10,10),script.Parent.Parent.HumanoidRootPart.Position.Y,script.Parent.Parent.HumanoidRootPart.Position.Z-math.random(-10,10))
Animation:play()
wait(2)
end

the one thing that i need to do is playing idle animation while waiting two seconds. (anim name is just idle)

calm walrus
#

To load animations u need to find the animator inside the model’s humanoid

#

So u can do something like

#

Local animation = script.Parent.Parent.Humanoid.Animator:LoadAnimation(script.Run)

#

Or wherever the animator is located in the model

#

And then

#

Wait(2) doesn’t work

#

In this case u gotta do

#

Humanoid.MoveToFinished:Wait()

#

So it won’t trigger anything until u finish moving

#

Then u write wait(2)

calm walrus
#

local Animation = script.Run
local humanoid = script.Parent.Parent:FindFirstChild(“humanoid”)
local track = humanoid.Animator:LoadAnimation(Animation)

while true do
script.Parent.WalkToPoint = Vector3.new(script.Parent.Parent.HumanoidRootPart.Position.X-math.random(-10,10),script.Parent.Parent.HumanoidRootPart.Position.Y,script.Parent.Parent.HumanoidRootPart.Position.Z-math.random(-10,10))
humanoid.MoveToFinished:Wait()
track:Play()
wait(2)
track:Stop()

end

brittle badgeBOT
#

studio** You are now Level 3! **studio

calm walrus
#

@warm oriole

#

Check if it works I wrote it on my phone so I can’t run it

warm oriole
#

this shit was making for an npcs AI😭

#

ima sorry for wasting ur time bruh

#

ill try to figure it out or either someone else would help me (u can too)

#

but uh