Keeping Atmosphere Fog Outside, but not Inside

Hey there!
I’m not sure what category this goes in, so let me know please.
I’m making a horror game that uses atmosphere for a fog effect, but my issue is I want the fog outside the building the same, but I want to get rid of it inside, so I can make a dark, scary effect. I have some pictures down below.

Here’s the atmosphere fog outside:

Here’s the fog from the inside of the building currently:

How can I get it to look like this only on the inside:

(Sorry about the random chat in some of the photos.)

4 Likes

Did you try putting a fan in the building?

Or maybe use region detection to just have fog in certain areas outside the building which then perhaps also have it move around outside. Or us a large fog particle emitter with transparency high in certain areas. Or some mesh fog floating around

1 Like

I don’t know how to use or what region detection is, exactly. What is it?

You could create a part (region) and scale it to the interior of your building. Maybe make multiple if needed.

Use :GetTouchingParts() to see if the player is inside the part or not. If so, disable fog for the client.

That is the most simple way to do it.

4 Likes

I thought the fan idea was pretty funny!!!..

Boogagle idea sounds good too, if you can disable to fog…and it is not some plugin that does it globally

This would use a local script to turn off the fog, right? I’m not too great with local script placement, so where would it go?

It can go in the following:

  • StarterGui
  • StarterPack (I don’t recommend this)
  • StarterPlayerScripts
  • StarterCharacterScripts
  • ReplicatedFirst (Should only be here for loading screens and such)
1 Like

To add on to this:
StarterCharacterScripts, StarterPack and (possibly) StarterGui will clone the localscript somewhere each time the character is added.
This makes writing a fog change script, or anything else to do with the character, a bit easier.
A script inside the character can use script.Parent:WaitForChild("HumanoidRootPart") and not have to worry about it disappearing, because it will also disappear when the character does.

The other folders will put scripts into the Player only once, which means you have to connect to player.CharacterAdded, otherwise just doing game.Players.LocalPlayer.Character:WaitForChild("HumanoidRootPart") can become invalid when the character dies - it will be left referring to a part that does not exist.
It’s no big deal, it’s just 2-3 extra lines of code.