Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

TimeOfDay doesnt see the value 6 as 6:00:00?

Asked by 10 years ago

How would i go about doing this? It is supposed to give me bricks(a leaderstat value) when the TimeOfDay is greater than the start, and less than end.

If i have a start and end value(they are numbers for hours),

Hours = stats.Hours Start = Hours.Start End = Hours.End

start = 6 end = 18

I dont think TimeOfDay sees the value 6 as 6:00:00

if Game.Lighting.TimeOfDay > Start.Value and Game.Lighting.TimeOfDay < End.Value then while true do Bricks.Value = Bricks.Value + BPS.Value wait(1) end end

1 answer

Log in to vote
0
Answered by 10 years ago
start = 6
end = 18

if game.Lighting.TimeOfDay > "0"..start..":00:00" and game.Lighting.TimeOfDay < end..":00:00" then
while true do
Bricks.Value = Bricks.Value + BPS.Value
wait(1)
end end
Ad

Answer this question