I need help with coding a real time Day/Night script using GMT time (UTC+10, I think)
What’s the problem?
I need Lua to find the UK time (GMT/UTC+10) and then to match it in the Day/Night script.
What I have tried:
I have tried tick(), that gets the user time, which I don’t really want.
could I do it? How would I approach it?
I have also looked here, for other posts.
look into this: os
Ok, thanks. I’ll look into it. I am using this for a train game based in the UK, and I think having proper time would suit the game, considering the routes are long, and my aimed player base seem to always stick around for a few hours or so.
Use this, very easy:
os.date("%X", os.time() + 36000)
Then use a function like this
while wait(1) do
game:GetService("Lighting").TimeOfDay = os.date("%X", os.time() + 36000)