So what I want to do is to exclude the Y axis on the velocity but if I try doing this, the result it gives are numbers in the tens of thousands. But without the multiplication of the vector, it returns the regular velocity.
local currentVelocity = RootPart.AssemblyLinearVelocity * Vector3.new(1, 0, 1)
local currentVelocity = Vector3.new(RootPart.AssemblyLinearVelocity.X, 0, RootPart.AssemblyLinearVelocity.Z)
I just figured that the problem was where I divide vectors. I don’t know why this would happen
local currentVelocity = RootPart.AssemblyLinearVelocity * Vector3.new(1, 0, 1)
local currentSpeed = currentVelocity.Magnitude
local velocity = direction * MaxSpeed
local deltaVelocity = velocity - currentVelocity
local currentSpeedSequence = math.clamp(currentSpeed / MaxSpeed, 0, 1)
Acceleration = EvaluateNumberSequence(Acceleration, currentSpeedSequence)
local force = deltaVelocity / Acceleration <-- lies here