Setting the CanCollide Property of the Torso

I am currently trying to set the CanCollide property of a Rig (The Base R6 rig that can be created via the Rig Builder).

The problem is, no matter what I do I cant set it to false :sob:
I saw somewhere people recommended using collision groups, but I create all mine via scripts, and ones get created for certain things so making a collision group update for every new collision group I make sounds like a pain.

So yeah I just kinda dont know how to fix it at all.


My code for reference:

	-- // Create Class //
	local Class = {}
	
	-- || Model ||
	Class.Model = script.R6:Clone()
	Class.Model.PrimaryPart.Anchored = false
	Class.Humanoid = Class.Model:FindFirstChildWhichIsA('Humanoid') :: Humanoid
	Class.Animator = AnimationHanlder.new(Class.Model)
	
	for _, BasePart in Class.Model:GetDescendants() do
		if BasePart:IsA('BasePart') then
			BasePart.CanCollide = false
			BasePart.CanTouch = false
			BasePart.CanQuery = false
			
			BasePart.LocalTransparencyModifier = 0
		end
	end
	
	Class.Model:FindFirstChild('Torso').CanCollide = false

Unfortunately because of how Humanoids are coded specific limbs of the character will always be collideable. You’d need a better structure at creating collision groups, because that’s the only solution you have. That or don’t use humanoids.

Well is there anyway to tell when a CollisionGroup is created?

As of now I cant exactly change the structure of how they are created (Due to how a vehicle system of mine works, of which creates a group for every vehicle cause otherwise the vehicles get wacky.)

If there isnt then I might be screwed lol

Unfortunately there isn’t, but if you create a wrapper for it (a module which handles the default PhysicsService functions aswell as creating a custom event) then you’re good to go.

1 Like

Are you creating too many collision groups and after that it just doesn’t create more?

I searched set player to collision group and got a few hits on the forums.

Currently I’m not creating a CollisionGroup for the rig so I don’t think that’s it.
That and from printing it, there are only 3 collision groups.

Thanks though!