Prevent Camera moving through transparent/semi-transparent parts

I’m currently building my hometown, starting with a small shop. I used a scripted door which teleports you to the shop and there is a window, but how can one make it so the user can not zoom out past transparent objects such as windows.

I tried using some help from a few years or months ago but it is outdated and sometimes when the user logs in, their camera spawns elsewhere on the map without being able to move and having their camera locked in one place. (I fixed that bug by removing the script)

Any help?

6 Likes

Feedback

You could put a BlockMesh into the part and change the scale of the BlockMesh to 0,0,0 (don’t change the transparency of the part).

Credits to lucided.

7 Likes

Ok try this:

1.- Add a part behind the transparent part.
2.- Add a SpecialMesh to the part behind it.
3.- Make the Mesh invisible.
4.- Make sure the part is anchored

I am not sure if this will work but you can try.

2 Likes

Nope, doesn’t work but thanks for the effort.

1 Like

I see, I am sorry I am not that good at building so I can’t help that much.

1 Like

I’m trying to get it to work on the “Glass” material, and that too wouldn’t work. I used the “playermodule” method as shown here.

This method DID work, but 80% of the time when the player spawns in, their camera is stuck in the air behind a wall, etc.

It’s fine. The game is in beta testing anyway so.

1 Like