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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 18 Jul 2016 06:48 PM |
There shouldnt be a space between "else" and "if" in your elseif statement.
|
|
|
| Report Abuse |
|
|
|
| 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 |
|
|