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
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.)
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.