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

Does This script work?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

This is the script.

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

while true do
    Time = Time + 1
    wait(x)
end
0
You guys must really hate me cause i'm knew to scripting! PAINFULDEATH156 0 — 10y

3 answers

Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
10 years ago
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.

0
Hope this helps. HexC3D 830 — 10y
Ad
Log in to vote
0
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
10 years ago

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.

Log in to vote
-3
Answered by 10 years ago

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

Answer this question