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: Nighttime script

Previous Thread :: Next Thread 
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 10:42 AM
A script to change day to night please.
Report Abuse
adammthomas2000 is not online. adammthomas2000
Joined: 24 Feb 2013
Total Posts: 454
23 Jul 2013 10:43 AM
--This is inefficient, but it gets the job done:

g = game.Lighting
time = 5
while true do
g.TimeOfDay = "1:00:00"
wait(time)
g.TimeOfDay = "1:20:00"
wait(time)
g.TimeOfDay = "1:40:00"
wait(time)
g.TimeOfDay = "2:00:00"
wait(time)
g.TimeOfDay = "2:20:00"
wait(time)
g.TimeOfDay = "2:40:00"
wait(time)
g.TimeOfDay = "3:00:00"
wait(time)
g.TimeOfDay = "3:20:00"
wait(time)
g.TimeOfDay = "3:40:00"
wait(time)
g.TimeOfDay = "4:00:00"
wait(time)
g.TimeOfDay = "4:20:00"
wait(time)
g.TimeOfDay = "4:40:00"
wait(time)
g.TimeOfDay = "5:00:00"
wait(time)
g.TimeOfDay = "5:20:00"
wait(time)
g.TimeOfDay = "5:40:00"
wait(time)
g.TimeOfDay = "6:00:00"
wait(time)
g.TimeOfDay = "6:20:00"
wait(time)
g.TimeOfDay = "6:40:00"
wait(time)
g.TimeOfDay = "7:00:00"
wait(time)
g.TimeOfDay = "7:20:00"
wait(time)
g.TimeOfDay = "7:40:00"
wait(time)
g.TimeOfDay = "8:00:00"
wait(time)
g.TimeOfDay = "8:20:00"
wait(time)
g.TimeOfDay = "8:40:00"
wait(time)
g.TimeOfDay = "9:00:00"
wait(time)
g.TimeOfDay = "9:20:00"
wait(time)
g.TimeOfDay = "9:40:00"
wait(time)
g.TimeOfDay = "10:00:00"
wait(time)
g.TimeOfDay = "10:20:00"
wait(time)
g.TimeOfDay = "10:40:00"
wait(time)
g.TimeOfDay = "11:00:00"
wait(time)
g.TimeOfDay = "11:20:00"
wait(time)
g.TimeOfDay = "11:40:00"
wait(time)
g.TimeOfDay = "12:00:00"
wait(time)
g.TimeOfDay = "12:20:00"
wait(time)
g.TimeOfDay = "12:40:00"
wait(time)
g.TimeOfDay = "13:00:00"
wait(time)
g.TimeOfDay = "13:20:00"
wait(time)
g.TimeOfDay = "13:40:00"
wait(time)
g.TimeOfDay = "14:00:00"
wait(time)
g.TimeOfDay = "14:20:00"
wait(time)
g.TimeOfDay = "14:40:00"
wait(time)
g.TimeOfDay = "15:00:00"
wait(time)
g.TimeOfDay = "15:20:00"
wait(time)
g.TimeOfDay = "15:40:00"
wait(time)
g.TimeOfDay = "16:00:00"
wait(time)
g.TimeOfDay = "16:20:00"
wait(time)
g.TimeOfDay = "16:40:00"
wait(time)
g.TimeOfDay = "17:00:00"
wait(time)
g.TimeOfDay = "17:20:00"
wait(time)
g.TimeOfDay = "17:40:00"
wait(time)
g.TimeOfDay = "18:00:00"
wait(time)
g.TimeOfDay = "18:20:00"
wait(time)
g.TimeOfDay = "18:40:00"
wait(time)
g.TimeOfDay = "19:00:00"
wait(time)
g.TimeOfDay = "19:20:00"
wait(time)
g.TimeOfDay = "19:40:00"
wait(time)
g.TimeOfDay = "20:00:00"
wait(time)
g.TimeOfDay = "20:20:00"
wait(time)
g.TimeOfDay = "20:40:00"
wait(time)
g.TimeOfDay = "21:00:00"
wait(time)
g.TimeOfDay = "21:20:00"
wait(time)
g.TimeOfDay = "21:40:00"
wait(time)
g.TimeOfDay = "22:00:00"
wait(time)
g.TimeOfDay = "22:20:00"
wait(time)
g.TimeOfDay = "22:40:00"
wait(time)
g.TimeOfDay = "23:00:00"
wait(time)
g.TimeOfDay = "23:20:00"
wait(time)
g.TimeOfDay = "23:40:00"
wait(time)
g.TimeOfDay = "24:00:00"
wait(time)
g.TimeOfDay = "24:20:00"
wait(time)
g.TimeOfDay = "24:40:00"
wait(time)
end
Report Abuse
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 10:44 AM
Thank you. Do you have a fog script? If so may I have that too please?
Report Abuse
adammthomas2000 is not online. adammthomas2000
Joined: 24 Feb 2013
Total Posts: 454
23 Jul 2013 10:45 AM
...I rarely mess with fog. Sorry man.
Report Abuse
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 11:21 AM
Bump de bump
Report Abuse
adammthomas2000 is not online. adammthomas2000
Joined: 24 Feb 2013
Total Posts: 454
23 Jul 2013 11:25 AM
Wait, do you want to enable fog, or do you want a script that turns it on/off?
Report Abuse
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 11:25 AM
Enable and make it stay.
Report Abuse
adammthomas2000 is not online. adammthomas2000
Joined: 24 Feb 2013
Total Posts: 454
23 Jul 2013 11:29 AM
Open explorer and select game.Lighting.

FogColor – This is the color of the fog.

FogEnd – This is the distance at which the scene is 100% fogged. I like about 100.

FogStart – This is the distance at which the fog begins. Inside this distance you will not see fog. Do 0 unless you want your players to be able to see in front of them.

You will have to go into test mode a lot to get good adjustments.
Report Abuse
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 12:28 PM
I don't get it. Right now I am in sky but I don't know where to get fog color or anything.
Report Abuse
Jurok is not online. Jurok
Joined: 26 Feb 2012
Total Posts: 13387
23 Jul 2013 12:30 PM
It's in "Lighting", not sky. Click "lighting"

my opinions > yours
Report Abuse
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 12:38 PM
I still do not get what I am supposed to do.
Report Abuse
Tuxwonder is not online. Tuxwonder
Joined: 21 Jan 2008
Total Posts: 888
23 Jul 2013 12:57 PM
Oh my dear god, adammthomas that code is actually painful to look at...
Report Abuse
tdog158 is not online. tdog158
Joined: 08 Jul 2008
Total Posts: 5413
23 Jul 2013 01:01 PM
while true do
 for hour = 0, 23 do
  for minute = 0, 40, 20 do
   game.Lighting.TimeOfDay = ( "%s:%s:00" ):format( hour, minute )
   wait( 5 )
  end
 end
end

Is that better, tux?
Report Abuse
Absurdism is not online. Absurdism
Joined: 18 Jul 2013
Total Posts: 2568
23 Jul 2013 01:01 PM
IT BURNS MY EYES! OH GOD. MUST. REWRITE.

g = game.Lighting
time = 5
while wait(time) do
for i=1, 72 do
wait(time)
g:SetMinutesAfterMidnight(i * 20)
end
end
Report Abuse
LordFlexo is not online. LordFlexo
Joined: 27 May 2013
Total Posts: 3476
23 Jul 2013 10:16 PM
I need fog. Not night.

Bump.
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