I have a vehicle that originally moved via BodyForce which worked perfectly. But with different models having different masses, All models would accelerate differently because of Newtons First Law ( Acceleration = ( Force / Mass ) ) so I would need to tinker with it for hours so they all move at the same rate. I tried Body Velocity but when its 0, the object is basically anchored and losses its effect of moving naturally when not controlled.
So my only option was to tinker. Is there a way to calculate the mass of model and find its speed through a print script quick or better way altogether.
local shipspawns = workspace.ShipSpawns
local mass = 0
for i,v in pairs(shipspawns:GetDescendants()) do
if v:IsA("Part") or v:IsA("MeshPart") then
mass = mass + v:GetMass()
end
end
print(mass)--1788.5678798
Still not completely sure on how I take mass and a final final velocity and find how much force to apply.
You already know that Acceleration = Force / Mass, but you can use the distributive property to find the other values
Force = Mass * Acceleration
And the formula for acceleration is: Acceleration = Distance / Time
So if you want to find the force you would need, get the Distance you want to travel (in ROBLOX that would be in Studs) over a period of time (Since BodyForce and Vector force are constantly applied, you would want this to be Distance over a Physics step (About 1/40th of a second but varies))