Non-Humanoid Horse script using ForwardVector Issue

What do you want to achieve?
A horse with proper movement

What is the issue?
The horse is working right now, however when going at a 45 degree angle in the world where both the X and Z forces need to be equal to get that type of rotation, eg. 25, 0, 25; it sometimes reaches numbers that appear like this,

-5.9945083194179e-05, -6.1329214076977e-05, -0.90025275945663

I’m not sure how to fix the calculation for this to make it work. What I’m assuming is the numbers are so low it just doesn’t move.

What solutions have you tried so far?
I tried using a function that rounds the velocity values however had no luck with this. The script is a module script and if any code is needed to explain this please let me know.

Whats the code with your calculations?

        model.HorseBody.ForwardVector.Attachment0 = model.HorseBody.HorseVelAttachment
        local targetVelocity = self:Vector(char.HumanoidRootPart.CFrame.lookVector) * self.Speed
        local differenceVelocity = targetVelocity -- - model.HorseBody.Velocity
        model.HorseBody.ForwardVector.Force = differenceVelocity * model.HorseBody:GetMass()* 5

self.Speed means 25

function Horse:Vector(vector)
    return vector.Magnitude > 0 and vector.Unit or Vector3.new()
end

Would you mind showing a video of your problem for extra clarity?

The console is printing X,Y,Z and X seperately.

And what value are you printing in the script?
The force?

print(horseModel.HorseBody.Velocity)

Try printing the force thats put onto the horse when it stalls out as it compares to the normal one

Here, the obviously higher values are the ForwardVector’s force.

Realized I forgot to include the rotating logic,

function Horse:Rotate(Side, model, char)
	local vel = model.HorseBody.AngularVelocity
	vel.Attachment0 = model.HorseBody.HorseVelAttachment
	if Side then
		vel.AngularVelocity = Vector3.new(0,-.01,0)*self.Speed
	elseif not Side then
		vel.AngularVelocity = Vector3.new(0,.01,0)*self.Speed
	end
end

Hooked into a localscript controller with A and D binded to Side = True / Side = False