I know I'm probably missing something stupid, but I'm making a script that adjusts the FogEnd for my game (It's in a regular script in the workspace.). The first time it didn't work, I tried tying it to a localscript which didn't work either. In studio, only the first method worked.

Here's my code:

workspace.Announcement.Text = "WARNING: HEAT REACTOR MELTDOWN IN PROGRESS. PLEASE EVACUATE IMMEDIATELY!"
--===================INITIAL CONFIGURATIONS===================--
	p = script.parent
	lights = workspace.Lights
----
	p.TEMPHIGH:Destroy()
	p.MASTER:Destroy()
	p.NORMAL:Destroy()
	p.Status:Destroy()
	p.FIRE:Destroy()
----
	workspace.CIndicator.BrickColor = BrickColor.new("Cocoa")
	workspace.LC.BrickColor = BrickColor.new("Cocoa")
	workspace.CoreTemperature.xTSC.Disabled = true
	workspace.CoreTemperature.TSC.Disabled = true
	workspace.ServerRoomTemperature.Value = nil
	workspace.CControl.ClickDetector:Destroy()
	workspace.CoreTemperature.Accel:Destroy()
	workspace.CoreTemperature.Value = nil
	workspace.LC.ClickDetector:Destroy()
	workspace.CoolantBreach:Destroy()
--===================LIGHTING===================--
	game.Lighting.FogColor = Color3.fromRGB(100, 0, 0)
	script.LColor.Disabled = false
	game.Lighting.FogEnd = 45 --PROBLEM HERE
	print(game.Lighting.FogEnd)

Thanks a lot in advance. Also, I'm sorry for asking a lot of questions lol

4 comments

0

We need an error for us to answer. If there are no errors please tell us such!

0

There are no errors...

0

Can you send a test place so the problem will be easier to find?

0

I'd rather not, but i can have you join the game and guide you through when its supposed to be working.