How do I make parts set to CanCollide = false NOT see through?

I have a part that has CanCollide to false. The issue is that my camera can go through the part because CanCollide is set to false. Here’s what I mean:
Video
How do I make it NOT see through without setting CanCollide to true?

2 Likes

Sorry I couldn’t find much help :frowning:

1 Like

Sadly, there is no way to easily go about doing this. By default it seems that the engine or core code enables the camera to clip through objects that are meant to be walked through, or transparent objects/parts such as windows on a house.

There’s a few ways I can think about going through with this though, and it has to do with programming though.

  1. A script; make it so that the part is only CanCollide = false when the player is near or around the part by using a system to “scan” the area for any players.
  2. Manipulating the Camera as to disallow it from traveling through the part, though I wouldn’t know how to go about this, but I’d know that you’d have to change the default Camera properties to scriptable.
  3. You can turn on Invisicam, so it does this for ALL parts, including ones that have CanCollide on
    StarterPlayer → DevCameraOcclusionMode → Invisicam

Hope that helped

2 Likes

If you want players to be able to walkthrough/fall through without them seeing through first, like in obbies where they can cheat by looking under if they can see through the platform before walking on it, you can just leave the part CanCollide = true and then use collision groups.

Make a Collision group and name it whatever you want that identify the NoSeeThrough parts. Select them and add it to that collision group. Add another group call players so you know it will be players to not collide with the parts. Untick where players and NoSeeThrough intersects in the collision groups table, it will make players and the NoSeeThrough parts not collide with each other. Make sure your NoSeeThrough parts are set CanCollide = true or else it won’t work.


Collision groups is open with the Model tab and under Advanced.

Add the following Server script into the StarterCharacterScripts. It will make all parts and meshparts in the character model to be part of the players collision group so it won’t collide with the NoSeeThrough parts.


If you are not familiar with CollisionGroupId, like it’s shown in the script saying that CollisionGroupId = 2, that is like the index in the collision groups. Default is 0, which is for the parts that everything can collide with such as baseplate. Each new collision group you add to it will be counted as 1 and up. So since I created the NoSeeThrough first, it’s #1 then the players, #2. This is also how you make players not collide with each other. Just add the script telling which group the baseparts inside the character model is in and then in the collision group table, uncheck the box where it intersects with the player group.

3 Likes

You could always just make every part have a transparency of like 0.2, so they can move their camera through all the parts without knowing which one is the true part.

1 Like