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

How do I make a day and night script? [closed]

Asked by 9 years ago

I am making a RP game called Blokville, and I need a day and night script. Just to make it more realistic as I am aiming for it to be the most realistic roleplay game on ROBLOX. It sounds a bit silly but I really do.

0
This is not a request site. Please attempt this yourself, and we can help you with the code. The Lighting service is a good place to start. iaz3 190 — 9y

Closed as Not Constructive by Perci1, woodengop, and Unclear

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 9 years ago

Here's a way to do it:

local TODhr = 12
function setTODfromTODhr(hrNum)
    local TODstringhr = tostring(hrNum) .. ":00:00"
    return TODstringhr
end
while wait(2) do
    game.Lighting.TimeOfDay = setTODfromTODhr(TODhr)
    TODhr = TODhr + 1
end

P.S. as iaz3 said, this is not a request site. Try looking on the ROBLOX wiki

Ad