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: Do you see what I am going for here?

Previous Thread :: Next Thread 
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jun 2013 04:41 PM
The time of day is controlled by a different script.
This is supposed to handle the ambient and brightness.
Yes its wrong, but do you see what I am going for?
Could you fix it so it would work?

while true do
while game.Lighting.TimeOfDay > 8:00:00 and game.Lighting.Ambient < Color3.new(140/255,140/255,140/255) and game.Lighting.Brightness < 1 do

game.Lighting.Ambient = game.Lighting.Ambient + Color3.new(1,1,1)
game.Lighting.Brightness = game.Lighting.Brightness + .00714
wait()
end
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
04 Jun 2013 04:44 PM
while true do
while game.Lighting.TimeOfDay > 8:00:00 and game.Lighting.Ambient < Color3.new(140/255,140/255,140/255) and game.Lighting.Brightness < 1 do

game.Lighting.Ambient = game.Lighting.Ambient + Color3.new(1,1,1)
game.Lighting.Brightness = game.Lighting.Brightness + Color3.new(.00714)
wait()
end

Try that.
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
04 Jun 2013 04:45 PM
Never mind!

Try two ends.
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jun 2013 04:45 PM
Nonononono
there is a GIANT red squiggly line under the while blah blah do statement.
And Im pretty sure Im not handling these values correctly either...
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
04 Jun 2013 04:46 PM
Try another end...
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jun 2013 04:47 PM
still there :D
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
04 Jun 2013 04:47 PM
Put it in the output.

If it says 'attempt to call a nil value', then you certainly need another end.
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jun 2013 04:49 PM
16:48:30.913 - Workspace.Day/Night Cycle.Ambient:2: 'do' expected near ':'
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
04 Jun 2013 04:49 PM
game.Lighting.TimeOfDay > 8:00:00
8:00:00 is not a valid value here xP

Try using this method:
:GetMinutesAfterMidnight()
http://wiki.roblox.com/index.php/GetMinutesAfterMidnight_(Method)
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jun 2013 04:52 PM
I still dont know how to set up the MinutesAfterMidnight into the statement though :P
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
04 Jun 2013 04:55 PM
Let's say the time is 00:00:00 or something.
And you do:
print(game.Lighting:GetMinutesAfterMidnight())
It'll print 0.
If it was 00:30:00 then:
It'll print 30.
Report Abuse
FootBa11 is not online. FootBa11
Joined: 16 Sep 2008
Total Posts: 11501
04 Jun 2013 04:58 PM
OHHHHHHHHH

so it would be:

while MinutesAfterMidnight > 1234 do
stuff
end


Is that right?
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
04 Jun 2013 05:03 PM
while game.Lighting:GetMinutesAfterMidnight() > 1234 do
stuff
end
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