Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Fog and Ambient doesn't reset to normal?

Asked by 4 years ago
Edited 4 years ago

I was coding something for some guy. He doesn't know how to script, so I decided to give him my services. However, with this generator model, I put the broken version in ReplicatedStorage and the fixed version in Workspace. it worked, until I put fog and ambience configs and settings in. Code here.

Fix code

01local ClickDetector = script.Parent.ClickDetector -- The Detector for when the player clicks. Recommended to stay as it is.
02 
03local printText = "Remote event fired successfully!" -- Put the print text here, when the buttons are fired they will print this text in the Developer Console
04 
05local brokenAmbient = "0,0,0" -- Put the RGB color of the ambient you've choosed when the generator is broken\
06local brokenFogEnd = 350 -- The fog when it is broken
07local brokenBrightness = 0 -- Change this brightness to your choosing when the generator is broken.
08local fixedAmbient = "255,255,255" -- Put the RGB color of the fixed ambient/your default ambient
09local fixedBrightness = 1 -- Change this brightness to your choosing when the generator is fixed/default.
10local fixedFogEnd = 750 -- The fog when it is fixed
11 
12 
13local ReplicatedStorage = game:GetService("ReplicatedStorage") -- Replicated storage
14local GeneratorFolder = game:GetService("Workspace").Generators
15 
View all 54 lines...

Broken:

01local ClickDetector = script.Parent.ClickDetector -- The Detector for when the player clicks. Recommended to stay as it is.
02 
03local printText = "Remote event fired successfully!" -- Put the print text here, when the buttons are fired they will print this text in the Developer Console
04 
05local brokenAmbient = "0,0,0" -- Put the RGB color of the ambient you've choosed when the generator is broken\
06local brokenFogEnd = 350 -- The fog when it is broken
07local brokenBrightness = 0 -- Change this brightness to your choosing when the generator is broken.
08local fixedAmbient = "255,255,255" -- Put the RGB color of the fixed ambient/your default ambient
09local fixedBrightness = 1 -- Change this brightness to your choosing when the generator is fixed/default.
10local fixedFogEnd = 750 -- The fog when it is fixed
11 
12 
13local ReplicatedStorage = game:GetService("ReplicatedStorage") -- Replicated storage
14local GeneratorFolder = game:GetService("Workspace").Generators
15 
View all 54 lines...

**It's really odd, and I don't know why the fog and ambience stays the same after I press the fix lever.

If you can help me correct my code with any mistakes, do so.

Once again, thanks!**

Update 1: I noticed this only happened in his game, not mine which is really weird.

Answer this question