I am working on a prison status script but lighting (Clocktime) is not favorable. Check out my script:
local info = {
breakfast = "Head to cafeteria! Enjoy your food and be prepared to head outside once finished.",
yard = "Head outside to the yard. Play around,workout, or talk. All prisoners must go outside.",
celltime = "Get back to your cell! Did you not think your a prisoner? Well scram!",
lunch = "Head back to the cafeteria for lunch. Attendance if mandatory. Prisoners must eat at least one meal daily.",
free = "Its free time! Do whatever you want. (Except leaving prison grounds as it may lead to extra time in your cell.",
bed = "Time to head to your cell for sleep. Its been a long day, you need your rest. All prisoners must be in their cell.",
}
local function showPrisonStatus(status, info)
for _, v in pairs(game.Players:GetPlayers()) do
if v.Team == game.Teams.Police or v.Team == game.Teams.Prisoner then
game.ReplicatedStorage.Remotes.PrisonStatus:FireClient(v, status, info)
end
end
end
function roundNumber(num, numPlaces)
return math.floor(num*(10^numPlaces))/(10^numPlaces)
end
while wait(30) do
game.Lighting.ClockTime = math.floor(game.Lighting.ClockTime)
game.Lighting.ClockTime += 1
print(game.Lighting.ClockTime)
if game.Lighting.ClockTime == 7 then
showPrisonStatus("Breakfast!", info.breakfast)
end
if game.Lighting.ClockTime == 10 then
showPrisonStatus("Yard time!", info.yard)
end
if game.Lighting.ClockTime == 12 then
showPrisonStatus("Cell time!", info.celltime)
end
if game.Lighting.ClockTime == 15 then
showPrisonStatus("Lunch time!", info.lunch)
end
if game.Lighting.ClockTime == 17 then
showPrisonStatus("Free time!", info.free)
end
if game.Lighting.ClockTime == 19 then
showPrisonStatus("Bed time!", info.bed)
end
end
If you look at my script, every 30 seconds I check the clock by 1 hour. However, that makes the sky look glitchy. BUT, I need it to count using math.floor to get the desired status time (e.x. 6 or 12). How can I increase the clcoktime by a rounded number (to the nearest hundred) ti get what I want because clocktime looks likes this → 16.48209485 but I want 16.48.