How to make an object weigh nothing?

I have a car script, and I’m trying to make it so that it has a collision block around it to prevent the car from crashing into surfaces and bugging out.

I current have this part attached to my car to serve as a hitbox however the weight of the part is making my car unfunctional. I’ve tried to do multiple things like make the part massless and set custom physical properties however it still slows my car down:


image

20 Likes

Put it in an accessory

Accessory is 100% weightless

I think other properties like density and massless dont work very well

10 Likes

so like this

image

10 Likes

In your second image there is an option named “Massless” check that

9 Likes

yes I realized. I clicked it and it still slows my car down 50% (on a car with a top speed of 80MPS, it can only go 40MPS.)

8 Likes

So you only have these issues when you added the collision hitbox?

7 Likes

The hitbox part adds mass but the massless property doesnt work

parts inside of accessories should be actually weightless

5 Likes

yes, my car is weighed down only when the part is attached,

here is a demonstration:

shoot I just realized you cant see me removing it because of stupid OBS cropping but you will notice speed difference

9 Likes

Looks like it might be a collision issue, hard to judge though. Does the code itself ever try to calculate the mass of the assembly?

5 Likes

I’m utilizing roblox’s racing car because I dont know anything about physics so I dont really know

(I’m in biology right now, physics is my next class. I dont even know what friction does)

3 Likes

Try making two collision groups. One for the vehicle (only collides with the map or player [Would require you to set players collision groups when character loads]) and another collision group that only collides with the map. The first is what you could set the entire vehicle besides the hitbox to, then the other just for the hitbox.

4 Likes

what if I set all the parts inside of the car to have a “nocollisiongroup” object set to the hitbox? Also I am going to determine if its weight related by making the part really tall on the Y axis and seeing the differences

4 Likes

Actually just making one collision group that doesn’t collide with itself would work for the entire vehicle and hitbox included

5 Likes

I want my cars to be “ready to go” rather than having to track different equipted cars and manually setting collision groups or worry abotu code executing too slow during run time. for this reason I will be utilizing the “nocollisiongroup object” so I dont have to track equipted cars

4 Likes

wait how do I make one collision group that doesnt collide with itself? that sounds complex

3 Likes

Studio > Model tab > Collision Groups > Add Group

Then you just select the part(s) you want to set and change their CollisionGroup property

4 Likes

I have over 60 cars I cant do that manually for each one. Is it possible to run a script in command bar

3 Likes

Yep, just make a for loop that checks all cars descendants for any baseparts then change their collision group to whatever you set

Example:
In this example I’m assuming each car is within workspace, has a Chassis folder within, and that your new collision group is named Car

for _, car in game.Workspace:GetDescendants() do
	if car:IsA("Model") and car:FindFirstChild("Chassis") then
		for _, part in car:GetDescendants() do
			if part:IsA("BasePart") then
				part.CollisionGroup = "Car"
			end
		end
	end
end
2 Likes

Massless works fine, this seems more like a collision issue - Noticeable by the affect it has to the physics and how it also seems to have pushed the car body from the wheels/chassis

3 Likes

actually instead of assigning a collision group, I am going to simply set all the other parts of the car to “cancollide false”, with the hitbox being the only collosion object (outside of wheels)

3 Likes