What actually is P in body velocity?

I constantly get the acceleration I assign as “accel” in this script regardless of what I make P:

local weight = script.Parent.Parent:GetMass()*196.2 -- weight

local accel = 5 -- acceleration

local mass = script.Parent.Parent:GetMass() -- mass

script.Parent.MaxForce = Vector3.new(0,weight + accel*(mass), 0) -- resultant force

local count = 0

local PrevVelo = script.Parent.Parent.Velocity.Y

while true do
	wait(1)
	count = count + 1
	print("Time: "..count.." Seconds")
	print("Velocity: "..script.Parent.Parent.Velocity.Y.." m/s")
	print("Acceleration: "..script.Parent.Parent.Velocity.Y - PrevVelo.." m/s²")
	PrevVelo = script.Parent.Parent.Velocity.Y
	print("------------------------------------------------------------------------------")
end

So if P isn’t affecting the acceleration, what does it actually do?

.P Actually controls the power of the body velocity

You can read on the wiki about it

3 Likes

The P property determines how much power is used while applying force in order to reach the goal Velocity . The higher this value, the more power will be used and the faster it will be used.
The force the BodyVelocity exerts increases as the difference between the part’s current velocity and the goal velocity increases. This property is multiplied to this force to either amplify or diminish it.

3 Likes

I’m surprised it hasn’t been deprecated yet as currently it does absolutely nothing.
It used to control the power of the applied force however that was only when the PGS Physics Solver was disabled, which has been force enabled for over a year.

3 Likes