Scripting with fog

I am not a very good scripter btw.

I made a script and it is supposed to change the FogStart.
Can you please tell me what is wrong with it and where it should go? I assume it could go in ServerScriptService.

local fog = game.Lighting.FogStart

fog = 100

wait(0.5)

fog = 200

wait(0.5)

fog = 300

wait(0.5)

fog = 400

wait(0.5)

Ok, you’re not exactly changing the fog start. You’re changing the value of the variable, ‘fog’.

Your script should be like this:

local Lighting = game.Lighting
Lighting.FogStart = 100

and then do the rest.

What should the scripts parent be?

If it’s not a localscript, you should put it in workspace or something in workspace, or ServerScriptService or something in that.

Do ServerScriptService, that is better practice. In my opinion, only put a script in the workplace if it is referring to something that will change parents, then put it in that something. So for this script I would put it in the ServerScriptService, as it only refers to lighting, which never moves.