AI breaks when trying to move

I’m making a horror game, and the main monster is a spider-looking creature called Nim. I animated the running and idle animations, scripted the AI, and now this happens:

It basically starts off, stuck. Then, it falls sideways and floats to the point of origin, then it just moves sideways.

It does work, the AI and damaging, and I am not sure if it is with the Humanoid, the Script, or the Character itself, but it is moving incorrectly.

Video:

AI Script:

local run = nimhum.Run
local loadrun = nimhum:LoadAnimation(run)
local idle = nimhum.Idle
local loadidle = nimhum:LoadAnimation(idle)
loadidle:Play()

while wait() do
	for i,v in pairs(game.Players:GetChildren()) do
		local char = game.Workspace:WaitForChild(v.name)
		nimhum:MoveTo(char.PrimaryPart.Position)
		loadrun:Play()
		nimhum.MoveToFinished:Wait(1)
		loadrun:Stop()
		loadidle:Play()
		
		script.Parent.MouthLeft.Jaw2.Touched:Connect(function(hit)
			if hit.Parent.Name == char.Name then
				char.Humanoid.Health = 0
			end
			script.Parent.MouthRight.Jaw1.Touched:Connect(function(hit)
				if hit.Parent.Name == char.Name then
					char.Humanoid.Health = 0
				end
			end)
		end)
	end
end
1 Like

Maybe its something to do with the animations going beneath the ground. Honestly, I’m not the best at animating but check the animations to see if it goes beneath the ground.

Nope, the animations don’t seem to be going under the ground. I checked as close as possible, but nothing, even the foot didn’t go at least one tenth of a stud inside the ground. I also messed around with the humanoid to see the changes.

By the way, when the hip height is under 0.1, it just flies everywhere.

Okay. Il try and find you a professional animator to give you a hand.

I’m normally a good animator myself, but I guess that might help.

Hold on, the model is diagonal… I think I should make it straight. (I’ll try to.)

Update: Nope, can’t make it straight.

Update 2: It may be cause of the Physics Behavior of some parts. I’m currently messing around with those.

I’m not the best of a animator. I could just manage to make my character spin around.

Yeah that might be the problem since the humanoid will want to apply a force to make the humanoid root part upright or else it’ll trip I believe. Also is the hip height set correctly?

Try testing using nimhum:Move(0, 0, 1) to see if it moves properly in a certain direction, if that doesn’t work then it’s probably a problem with your rig