So I am sure other games have this but the main one I am thinking of is Loomian Legacy. When you use a Loomiboost, you can increase your chances to get different things for X amount of minutes. I am trying to achieve this but with a promo code. Everything with the promo codes is fine I am just stuck on how I should set up a counter going down from, let’s say, 20 minutes. I am storing the Buffs and the time left on the buffs in my datatable which looks a little something like this
[Player] = {
[TypeOfBuff] = TimeLeftOnBuff
}
When the player joins I load their data, check to see if they have any buffs and then put it into a session table. From there I am a little confused about where to go. I don’t even have an efficient system to count the time down yet. I planned to use coroutines and a while loop checking to see if the [Player][TypeOfBuff] > 0 but I can’t use this for multiple buffs at a time. I would also like to display the time, an easy way is to just insert a new IntValue into the Frame displaying the time and have a remoteEvent firing every time the time changes. Though there could be other ways. I’m sure this question has been asked before but I can’t find the right words to find an accurate explanation on where to start with this.