I’m trying to script a bus that has motorized doors. Although, I need the door model to clip through the body model. Using CollisionGroups is quite janky since if I need to duplicate buses and link them to the same CollisionGroup. As well as a limit to how many CollisionGroups you can make.
I was thinking of using “NoCollisionConstraint”, but I couldn’t link it by group, considering that the doors will need to clip through many parts. My existing code is using CollisionGroups which isn’t as effective.
function initalize()
pcall(function()
game:GetService("PhysicsService"):CreateCollisionGroup("Body")
game:GetService("PhysicsService"):CreateCollisionGroup("Misc")
game:GetService("PhysicsService"):SetPartCollisionGroup(script.Parent, "Misc")
game:GetService("PhysicsService"):SetPartCollisionGroup(script.Parent.Parent.Body, "Body")
game:GetService("PhysicsService"):CollisionGroupSetCollidable("Body", "Misc", false)
end)
end
initalize()
I’m trying to find a most efficient way for the doors, wheels, foldable seats, and more not collide with the body itself, since I’m using HingeConstraints for part movement, and I know it will spaz if collision isn’t turned off between the Body model and the part itself.
Misc and Body are the two groups that needs to have collision off for each other.