Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to change the weight of a part?

Asked by 6 years ago

Hi, i'm looking at making a car football game for me and my friends. However I can't seem to change the weight of the ball, so the gameplay is pretty slow.

I've tried BodyForce and editing the Custom Physical Properties but neither seem to do anything, however i'm new and could be doing it wrong.

Currently it feels like i'm driving into a large bowling ball. I'd like the ball to party lift from the ground if hit with enough speed, and just feel lighter overall when drive in to.

It would be great if a Roblox Studio pro could get back to me.

0
I think weight is size * density. ILikeTofuuJoe 1 — 6y
0
You'll need scripts to make it lift from the ground. ILikeTofuuJoe 1 — 6y
0
The script should detect the speed annd if there is enough speed than it will start rising, if there is not enough speed for flying than it will fll back to the ground. ILikeTofuuJoe 1 — 6y
0
Joe, do you even know how to script at all? DeceptiveCaster 3761 — 6y
0
Seems like you are remaking rocket league. ChainMailZombie 0 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

Go into CustomPhysicalProperties and there should be a property called Density and one called Friction. Density determines the mass of a Part, and this varies depending on the material of the Part. Friction is how hard it is to move a Part along a surface using force from a Player. Friction is the same in every material. Elasticity is how much a Part can flexibly move. There is also Friction and ElasticityWeight, which both determine the weight of movement and/or flexibility.

If you want to change the CustomPhysicalProperties of a Part via scripting, you would do:

part = script.Parent
part.CustomPhysicalProperties = PhysicalProperties.new(Density, Friction, Elasticity, FrictionWeight, ElasticityWeight)

For every word inside the parentheses would be the number you want to assign to that physical value. Good luck using CustomPhysicalProperties!

0
Thanks, this helped a bunch. The ball still doesnt really leave the ground, but it moves a lot better than before. GEHTSHR3KT 0 — 6y
0
No prob. DeceptiveCaster 3761 — 6y
Ad

Answer this question