Strange behaviour using AnimationControllers with a custom rig

Hello everyone!

Let me preface this post by saying that I have never worked with AnimationControllers before. The last time I made an NPC custom rigs were separated into parts and had humanoids, so this is all new territory for me.

Because I don’t really know how else to get my NPC to move, I am making my own movement module using TweenService and playing an animation at the same time. As you can see in the attached video, this works perfectly fine without the animations, but the NPC has sporadic behaviour when the animation is played. I have also tested the animations when the NPC is idle and the same thing happens.

Here’s the video:

My animation module:
local module = {}

local animationController = script.Parent.Parent:WaitForChild("AnimationController")
animationController.Parent = script.Parent.Parent:WaitForChild("demon_low_Plane")

local walkAnimation = animationController:LoadAnimation(script.Walk)
function module.walk(speed)
	walkAnimation:AdjustSpeed(speed or 1)
	walkAnimation.Looped = true
	walkAnimation:Play()
end

local idleAnimation = animationController:LoadAnimation(script.Idle)
function module.idle()
	idleAnimation.Looped = true
	idleAnimation:Play()
end

return module

Does anyone have experience with this type of thing and know what might be causing it? Is there an opensource module or something for custom NPCs like mine?

Thanks, any help is appreciated!

1 Like

everything looks ok, is your animation toggling the cancollide property?

1 Like

Not sure why it would do that, and if it was wouldn’t it just fall into the void? This is clearly moving up and down and when the idle animation is being played it moves on all axes.

1 Like

Not sure why it would do that, and if it was wouldn’t it just fall into the void?

im saying that it turned can collide off and let it fall into the void.

Im assuming the problem is with the animation themselves because the animation module looks squeaky clean in my eyes, but im not very familiar with animation work so i could very well be wrong.

1 Like

Do you know how an animation could potentially adjust collision properties?

What I meant by “Not sure why it would do that” was that expected behaviour would not be a fluxuating Y position as observed, just falling straight down.

1 Like

Moon animator 2 allows for it. (mabye)

and its not falling straight down because its moving towards the position you set it to walk towards

1 Like

Also, why would it vertically when I am moving it horizontally?

I will enquire with my animator and see if he did anything funky with the animations

1 Like

Also, why would it (move?) vertically when I am moving it horizontally?

thats how roblox characters work. you can navigate in the air, otherwise parkour neos wouldnt exist.

1 Like

Yes, it is possible to move objects on all axes, however I am only scripting it to move side to side and yet it is going up and down.

1 Like