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 » Scripters
Home Search
 

Is Greater than and Less than Possible at the Same Time?

Previous Thread :: Next Thread 
cc567 is not online. cc567
Joined: 15 Nov 2008
Total Posts: 74
18 Jul 2016 06:36 PM
Here's what I mean

while true do
t = game.Lighting:GetMinutesAfterMidnight()
i = game.Lighting.SunRays.Intensity
print (t)
if t >0 and t<1060 then i = .24
else if t>1060 and t < 1439 then i = 1 -- This doesn't check if MinutesAfterMidnight is between these two numbers. Help
wait(1)
end
end




Report Abuse
Klink45 is not online. Klink45
Joined: 06 Jun 2011
Total Posts: 26054
18 Jul 2016 06:39 PM
You should check if x is not EQUAL to y then.

if x ~= y then
--Do something.
end

Anything that isn't y will be greater than or less than it, so you should just check if it isn't y.

u sicko!
Report Abuse
cc567 is not online. cc567
Joined: 15 Nov 2008
Total Posts: 74
18 Jul 2016 06:40 PM
That points to one value. I want this script too activate within 5:59 and 11:59 PM
Report Abuse
Manypeople is not online. Manypeople
Joined: 19 Nov 2009
Total Posts: 177
18 Jul 2016 06:48 PM
There shouldnt be a space between "else" and "if" in your elseif statement.


Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
18 Jul 2016 06:48 PM
No
You'll need to make your own function

function inRange(var, min, max)
return var >= min and var <= max
end

if inRange(t, 0, 1060) then
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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