# How would i change the gravity of an object based on it's size?

1: My goal is to get objects to move based on their size.

1. So far i have tried bodyforce and scripts, but it hasn’t worked yet.

https://gyazo.com/8dbfee1fa18111f0aa941067bda52c75?token=7a686eb6562d052f5e9fc1d50b1bd07a

if you have any way to help me, it would be greatly appreciated! also if you know what game i am referening, +2 points to you.

Im not the smartest person ever in physics, but maybe take a look at this.

Do you want the objects to fall slower the bigger they are? (Superliminal?)
You can use `BasePart:GetMass()` and then apply a force upwards based on the mass

1 Like

i tried that but it freezes midair for some reason (?) also +2 points

Is there only one player in the game? If so you should set the network owner of all the draggable parts to the player so the player is controlling their physics instead of the server. The logic for the gravity resistance should be something like:

``````if holdingObject then
while holdingObject do
resizeObjectBasedOnPerspective()
antiGravityForce.Disabled = true
updateAntiGravityForceBasedOnSize()
wait()
end
else
antiGravityForce.Disabled = false
end
``````

Let me try to write up some code to make that work

If you enable custom Physical Properties, you can set the density to 0.01 to make it float.

Ok I got something working, `^ 0.95` is a ratio for the gravity difference between the parts, and `/ 10` is the multiplier to slow down gravity for all parts

``````BodyForce.Force = Vector3.new(0, Block:GetMass() * workspace.Gravity - (Block:GetMass() ^ 0.95) * workspace.Gravity / 10, 0)
``````

If you want, you could try @XdJackyboiiXd21’s method as it’s probably easier