I’m not asking for a script, I just need guidance on how this would work. I’m also aware this has been posted before, but I couldn’t get an answer in the same style. I want the daily challenge system in my game similar to Entry Point, where it is a random mission, same for all players, which changes every day. I don’t want to have to manually update it every day, because that would be tedious.
I’m looking for something that will stay the same for all players in all servers, but change each day to something different. If I used what you did, it would be different for all players.
not exactly, you could do it in a server script and save it in a datastore then detect when a day has gone by you just cycle through another daily challenge
I would create a table containing the list of challenges a user could obtain. Each day, I would generate a random index in this table and save it with the DataStore service so that all servers can acess it globally. I’d use os.time to record the time at which the index number was generated. Each time a server checks the index in the database (with an interval of 1/2h), if the os.time value saved next to the index number is greater than 24h, I generate a new index number and change the os.time to the current time.
However, this method has a flaw, for example, two or more servers could decide to generate a new index number at the same time, this wouldn’t break anything in itself, but it would be better to find a way to prevent this. I don’t have ideas about how to do so as of now however.
I can’t tell you what their devs did, but what I did.
Made an infinite loop with node.js
It communicates with each active rbx server. (This is the only event you need to trigger rerolling your missions/banner since you can rely on it happening every 24 hours GLOBALy)
I followed this documentation.
--That's a lie. I weaved this into my discord bot to save some memory
You may find yourself using a server but if resources are limited, you can always use replit.com. I just installed termux on my old android phone because free replit crashed a lot.
Its a lot of unessesary work so I can’t recommend it.
But your welcome to ask for clarity on any part of it