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

Day Night Cycle across all servers using Data Store?

Asked by 10 years ago

So I was wondering if it was possible using Data Store (recently came out [i think]) but as USUAL ROBLOX Wikia NEVER thoroughly explains how to use their new API's so I was wondering if someone could tell me if its possible and if so how? At least explain how Data Store works? All I want is the same time cycle across all servers DD:

0
This link pretty much sums it up and why you should use it instead of data persistence https://scriptinghelpers.org/blog/data-store-why-you-should-get-excited Kozero 120 — 10y

2 answers

Log in to vote
1
Answered by 10 years ago

I'd like to point out that there's an easier solution to the day/night cycle for everywhere: os.time. Unlike tick, it returns a synchronized time on every server, so you can just do some math with that to synchronize the day/night cycle.

0
I looked it up on google. I try every line of code involving os.time to get the hang of it but it always returns a nil value TochiWasHere 10 — 10y
Ad
Log in to vote
0
Answered by
Gamenew09 180
10 years ago

If you are looking at the Lighting.TimeOfDay variable then you would save the TimeOfDay variable in one place, which is a string so you don't need the tostring function. Then you would get the TimeOfDay variable from the DataStore, then plug it into the Lighting.TimeOfDay on the other place. And how to use DataStores you can look at the official Roblox Wiki's page on it. Hopefully you can understand that!

0
I understand that but I don't know enough of datastore to actively update and acquire the string. TochiWasHere 10 — 10y
0
You can look at the wiki page provided in the answer, click "Roblox Wiki's page on it". Gamenew09 180 — 10y

Answer this question