Can I anchor a part exclusively for a specific collision group and have it unachored for others?

Say I had CollisionGroup1, CollisionGroup2, and CollisionGroup3:
I want CollisionGroup2 to be able to push CollisionGroup1 but when CollisionGroup3 tries to push CollisionGroup1 it won’t be able to.

Can I anchor a part exclusively for a specific collision group and have it unachored for others or do I have to try something “hacky”?

Thanks

1 Like

I suppose locally anchoring parts could be a viable alternative, any suggestions on the collision groups however?

As far as I know from looking at the PhysicsService | Documentation - Roblox Creator Hub API, there is not a way to set whether a collision group can “push” or otherwise interact with physics along with another group. I believe you should write your own code for this based on the CollectionService | Documentation - Roblox Creator Hub and go from there.

2 Likes

I played around a bit, and I found something that may be a bit hacky, but might be good enough for your use case.

You can change a part’s CustomPhysicalProperties to make it impossible for a player to push. If you do this on the clients those you don’t want to push certain parts, everyone else would be able to push the parts instead of those specific clients.

-- PhysicalProperties.new(Density, Friction, Elasticity)
Part.CustomPhysicalProperties = PhysicalProperties.new(math.huge,math.huge,0)
1 Like

You can have a fake hitbox. So basically they will feel it is impossible to push without actually affecting the real object. Here is the solution’s post.

1 Like

Thanks, that is really smart actually. Daniel’s solution was good too but yours, I believe, would be optimal.