generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I need help with this fog script

Previous Thread :: Next Thread 
JJHarry is not online. JJHarry
Joined: 18 Dec 2010
Total Posts: 809
29 Sep 2012 12:25 PM
Help, this is the error:
Workspace.Day/night + Weather!:16: 'then' expected near '='


while true do

Time = game.Lighting.TimeOfDay

Brightness = game.Lighting.Brightness

Ambient = game.Lighting.Ambient

Fog1 = game.Lighting.FogColor

Fog2 = game.Lighting.FogEnd

Fog3 = game.Lighting.FogStart


if Time = "11:40:00" then
Fog1 = Color3.new(192, 192, 192)
Fog2 = 2750
elseif Time = "17:00:00" then
Fog1 = Color3.new(77, 77, 77)
Fog2 = 2400
Brightness = 0.5
elseif Time = "17:10:00" then
Fog2 = 1750
elseif Time = "17:20:00" then
Fog2 = 1500
elseif Time = "17:30:00" then
Fog2 = 1250
elseif Time = "17:40:00" then
Fog1 = Color3.new(153, 51, 0)
Fog2 = 1000
elseif Time = "17:50:00" then
Fog1 = Color3.new(51, 51, 51)
Brightness = 0.2
Ambient = "95; 95; 95"
elseif Time = "18:00:00" then
Fog1 = Color3.new(153, 51, 0)
elseif Time = "18:10:00" then
Fog1 = Color3.new(8, 8, 8)
Fog2 = 500
elseif Time = "18:20:00" then
Brightness = 0
Fog2 = 500
elseif Time = "05:10:00" then
Fog1 = Color3.new(28, 28, 28)
Fog2 = 750
elseif Time = "05:20:00" then
Fog2 = 1000
elseif Time = "05:30:00" then
Fog1 = Color3.new(102, 51, 0)
Fog2 = 1250
elseif Time = "05:40:00" then
Fog2 = 1500
Brightness = 0.25
elseif Time = "05:50:00" then
Fog1 = Color3.new(255, 102, 0)
Fog2 = 1750
Brightness = 0.5
elseif Time = "06:00:00" then
Fog2 = 2250
elseif Time = "06:10:00" then
Fog1 = Color3.new(51, 51, 51)
Brightness = 0.75
elseif Time = "06:20:00" then
Brightness = 1
elseif Time = "06:30:00" then
Fog1 = Color3.new(248, 248, 248)
end
end
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
29 Sep 2012 12:27 PM
Whats line 16?
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
29 Sep 2012 12:28 PM
If you're going to compare values, you have to use ==.
if Time = "11:40:00" then
if Time == "11:40:00" then*
Report Abuse
JJHarry is not online. JJHarry
Joined: 18 Dec 2010
Total Posts: 809
29 Sep 2012 12:29 PM
Thanks.
Report Abuse
sonichedgie is not online. sonichedgie
Joined: 22 Mar 2008
Total Posts: 4279
29 Sep 2012 01:19 PM
Heyy JJ when you're finished could you share this script with me? Either way thanks. (:
Report Abuse
JJHarry is not online. JJHarry
Joined: 18 Dec 2010
Total Posts: 809
29 Sep 2012 01:19 PM
Again, I need help:
This script wont change the fog, why is that?

Time = game.Lighting.TimeOfDay

Brightness = game.Lighting.Brightness

Ambient = game.Lighting.Ambient

Fog1 = game.Lighting.FogColor

Fog2 = game.Lighting.FogEnd

Fog3 = game.Lighting.FogStart


if Time == "11:40:00" then
Fog1 = Color3.new(192, 192, 192)
Fog2 = 2750
elseif Time == "17:00:00" then
Fog1 = Color3.new(77, 77, 77)
Fog2 = 2400
Brightness = 0.5
elseif Time == "17:10:00" then
Fog2 = 1750
elseif Time == "17:20:00" then
Fog2 = 1500
elseif Time == "17:30:00" then
Fog2 = 1250
elseif Time == "17:40:00" then
Fog1 = Color3.new(153, 51, 0)
Fog2 = 1000
elseif Time == "17:50:00" then
Fog1 = Color3.new(51, 51, 51)
Ambient = "95; 95; 95"
elseif Time == "18:00:00" then
Fog1 = Color3.new(153, 51, 0)
elseif Time == "18:10:00" then
Fog1 = Color3.new(8, 8, 8)
Fog2 = 500
elseif Time == "18:20:00" then
Brightness = 0
elseif Time == "05:10:00" then
Fog1 = Color3.new(28, 28, 28)
Fog2 = 750
elseif Time == "05:20:00" then
Fog2 = 1000
elseif Time == "05:30:00" then
Fog1 = Color3.new(102, 51, 0)
Fog2 = 1250
elseif Time == "05:40:00" then
Fog2 = 1500
Brightness = 0.25
elseif Time == "05:50:00" then
Fog1 = Color3.new(255, 102, 0)
Fog2 = 1750
Brightness = 0.5
elseif Time == "06:00:00" then
Fog2 = 2250
elseif Time == "06:10:00" then
Fog1 = Color3.new(51, 51, 51)
Brightness = 0.75
elseif Time == "06:20:00" then
Brightness = 1
elseif Time == "06:30:00" then
Fog1 = Color3.new(248, 248, 248)
end
Report Abuse
JJHarry is not online. JJHarry
Joined: 18 Dec 2010
Total Posts: 809
29 Sep 2012 01:21 PM
@sonichedgie

Okay, but it needs a LOT of work.
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
30 Sep 2012 08:26 PM
Is the time increasing? ;o
Do you have any errors?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image