Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Does This script work?

This is the script.

local Time = game.Lighting.TimeOfDay
local x = 1

while true do
	Time = Time + 1
	wait(x)
end

1 comment

0

You guys must really hate me cause i'm knew to scripting!

3 answers

Time = Time + 1 -- Do notice that Time is a String Value

So therefore it wouldn't work try game.Lighting.TimeOfDay = "14:00:00"

Notice that the Time of the day is "14:00:00" Therefore proving it's a string value" But you can use this method

GetMinutesAfterMidnight (Method) to cook up your own algorithm to create a Day and Night script.

1 comment

0

Hope this helps.

If you're trying to get a day/night cycle script, here you are. If you're new to scripting, I wouldn't choose to script something like that first.

It would make sence on lua.org but roblox is kidna different like a mixture of c++.

This discussion is preserved as it was. New answers, comments, and votes are closed.