local function UpdateForce()
Part.VectorForce.Force = ((TargetVelocity - Part.Velocity)) * mass
print(TargetVelocity.X .. " - " .. Part.Velocity.X .. " = " .. TargetVelocity.X - Part.Velocity.X)
end
This function actively corrects the value of a vectorforce to set a constant speed in a relaive axis, the problem is that since the value is not relative it accelerates infinitely,
No, i need it to be relative to attachment0
My problems are with this part in particula, for which I need to get the part’s velocity relative to it’s orientation so the script subtracts force when it is going over the desired speed:
TargetVelocity is setting the vectorforce’s force, so it is relative, I want to subtratct the current relative velocity so it does not accelerate more than it should.