Collisions Groups Are Not Working

I want to enable collision between parts but its not working.

Note : Output dont have any error

Code :

local PhysicsService = game:GetService("PhysicsService")

PhysicsService:CreateCollisionGroup("Part")
PhysicsService:CreateCollisionGroup("Baseplate")

PhysicsService:CollisionGroupSetCollidable("Part","Baseplate",true)

PhysicsService:SetPartCollisionGroup(workspace:WaitForChild("Part"),"Baseplate")
PhysicsService:SetPartCollisionGroup(workspace:WaitForChild("Baseplate"),"Part")

wait(3)
workspace.Part.Anchored = false

Part Properties : image

How can i fix it

2 Likes

it’s cause CanCollide = false, it has no collision so the part is going through lol, so yea collision group isn’t gonna work if the collision is Disabled for the part, but I think that script should work and then filter the other group off if you don’t want them colliding with the part. But I suggest just premaking the CollisionGroup so it doesn’t take some space up.

1 Like

Set part CanCollide to true

I recommend you make the collision groups yourself too. You can do that in the model tab. Click on Collision groups.

Make a group. Click on the part you want to add then click on the plus button for that group.

The reason because it is easier to look at and to organise

1 Like