"collider.enabled"

Hi, in script, using “collider.enabled = false;” didn’t worked although the mesh collider is unchecked in the the inspector. really had to replace this line with transform.position.y = -Value in order to get rid of the collider/collisions !!!

what’s wrong with this fiunction ? did I misunderstood ?
can you help me to disable colliders normally ?

thanks…

I’d have to see the code to be sure of what is going on… Does the bit of code you mentioned uncheck the enabled box in the inspector?

there’s no problem finally, I’m sorry for the mistake, I solved the issue I had by ensure the code was actually executed; thanks ! I’ll be more careful next time!

Hi !! I’m posting again because I’m still getting trouble with this, the code is actually executed but still there are issues:
I even decided to un-check the colliders and run no scipt at all but collisions are there !
please can you help?
why un-checking colliders leads to collisions ?

Try using collider.isTrigger = true