Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I force cancollide to false?

Asked by 1 year ago

NPC collides even though CanCollide is false I have tried to use a script to run through all its descendants and turn off cancollide but It doesn't work

3 answers

Log in to vote
0
Answered by 1 year ago

try this will turn off cancollide in part. Put this in your script in the part

script.parent.parent.part.CanCollide = false
0
I did but it didn't work, but don't worry I kinda fixed it with collisiongroups Kingu_Criminal 205 — 1y
Ad
Log in to vote
0
Answered by
ultrabug 306 Moderation Voter
1 year ago

There's a property in workspace called "HumanoidOnlySetCollisionsOnStateChange" if you set this to Enabled then instead of the game resetting the collision on the humanoids parts every frame it will only set them when the humanoid changes states. Since humanoids change states a lot you will probably also want to either reset the collisions to be what you want whenever the humanoid changes states, or if you don't need the npc to do anything you could change the humanoid's state to physics, which it can't get out of on it's own.

Log in to vote
0
Answered by 1 year ago

I sort of figured out the problem I discovered a pseudo-fix using physics service collision groups, but I still don't know why I originally had the problem

Answer this question