I am trying to make lava, but you can see everything clear under it.
I can fix this by making a gui popup when the camera is inside of the lava, but for that i need to detect whenever the camera its position is under the lava.
Is there a way to detect if the camera its position is inside of a part?
If your lava is a part, then you can cast a ray from the camera to the center of the lava, with only the lava part in its whitelist. If there’s a hit, then the camera must be outside. Otherwise, it must be inside.
You don’t want to cast all the time, though. Very long raycasts can be expensive. Check if there’s any lava nearby first. You can do this with a very tiny Region3 check.