I’m trying to make idle animations and walk animations for NPCs. I created some basic test animations but when they are loaded, the orientation of the animation doesn’t play properly.
Here’s how they look in the animation editor:
Idle
Walk
How they actually appear in game:
Idle
Walk
I looked on the devfourm and saw some people mention that issues like this are caused by the animation priority. So I changed the idle animations priority to walk and the walk animation to action, but I’m still getting the same problems
Not sure if it’s a problem with my code
local humanoid = script.Parent:WaitForChild("Enemy")
local AnimType = script.Parent.Enemy:WaitForChild("AnimationType")
local idle = humanoid:LoadAnimation(script.Idle)
local walk = humanoid:LoadAnimation(script.Walk)
idle:Play()
AnimType:GetPropertyChangedSignal("Value"):Connect(function()
if AnimType.Value == false then
walk:Stop()
idle:Play()
else if AnimType.Value == true then
idle:Stop()
walk:Play()
end
end
end)