I have an idea to make a server script that would take the local time (the clock on his device taking into account his time zone), compare this time with a pre-selected time point (namely it should be the same time for all - Greenwich - zero meridian). The point is that all players have the same for them for previously generated random actions, which will be equally played with each re-entry into the game, until their local time does not reach the global zeroing of this random, and a new random will not be selected.
To understand this, let me give an example. There is some module-table where there are different rows with different sentences, each unique. Need that during the day (24 hours) was selected once random phrase from there and written to the player’s screen, a new update of this phrase will be exactly in 24 hours, according to global time, namely, when his local time Greenwich reaches 0:00.
I hope that I have explained the essence of the question clearly. Here, a little more of my attempts, how you can realize the idea:
But I don’t think it should work, and at the very least there would be a big difference among all players. And I want all players to have the same update time for all their entries.
its works, actually. but im need to global reset of timer. i mean after 24 hours for all players which time is passed Greenwich 0:00 will be generated new text randomly.
ooh, then perhaps you could use os.date(“!*t”)
local date = os.date("!*t") -- this will return a table which has day
if (dayindatastore ~= date["day"]) then
-- a new day, change dayindatastore to current day
-- set new message
end
Use date as stated above as a seed for your random number when choosing the daily. So its the same for everyone without saving anything, or manually input days. Could even use a mix of both for special days.