How do I make a group of 50 parts all not collide with each other?

How do I make a group of like 50 parts all not collide with each other? I am having this issue where I make a collision group for each part, but my script is erroring
image
I basically just want lets say a group of 100 parts in a box all not collide with each other. How do I do this?

Thanks - lux

doccumentation Collision Filtering | Roblox Creator Documentation

You make 1 collision group (lets name it BoxParts), then select all the Parts you don’t want to collide with each other and drag them into the + box next to the collision group name (BoxParts).
Next, select that collision group to collide with the Default collision group, but not collide with itself (the BoxParts collision group).
I’ve done this for tank treads. Each tread is added to the Tread Collision group. They don’t touch each other but they do touch the Default group. This allows each tread to collide with and travel around the tank wheels, and collide with the ground & other items, but not actually contact each other. This stops weird movements and causes less lag because the physical contact between treads doesn’t occur.

2 Likes
local PhysicsServer = game:GetService("PhysicsService")
PhysicsServer:CreateCollisionGroup("CollisionGroupClogged")
PhysicsServer:CreateCollisionGroup("CollisionGroupUncogged")
PhysicsServer:CollisionGroupSetCollidable("CollisionGroupClogged", "CollisionGroupUncogged", false)
PhysicsServer:CollisionGroupSetCollidable("CollisionGroupUncogged", "CollisionGroupUncogged", false)
local part = script.Parent
PhysicsServer:SetPartCollisionGroup(v, "CollisionGroupUncogged")

The last part is a example, but is that correct the setting the groups?

Do you need to do it by script?
It’s much easier to create the group in Studio, and just select all the parts you want in the group, then click the + button next to the collision group you created in the collision group window.

Also, you only mentioned that you want the Parts in the box to not collide with each other, so why are you creating 2 groups in your script?