Best way to add daily active rewards?

Most of my brain freezes come actually from the other person here, because his way of explaining is very non existent (no offense) basically, I recommend you learning about arrays
You can learn about them here
So you can do something like

rewards = {50,100,150}

those numbers represent the rewards

And then running a function from the remote event, which basically indexes the value. So if it’s the first day, aka “1”, you could just do

RewardAmount = rewards[number]

if the number would be 1(aka first day) it would return the “50” value from the array

1 Like

well in your script you didn’t define getting player or local GivePlayerAward() = so I am confused about it not gonna lie

Thanks! I will read the document!
But should I create the array in a server script or in module script? and how do I decide which one to use and when

1 Like

If you know how to do it, module script would be best for the rewards, but if you don’t, just create the same arrays on server and on client.

1 Like

Well, it doesn’t really matter if you use module or script, the most important thing is that other scripts can access the same information if it’s in module, where as if it’s only in script it may cause unnecessary problems. I use arrays in scripts only if it’s something that only that one script uses, for looping and stuff like this. Where as I use modules when storing large amounts of informations, or just storing data which other scrips access regularly

1 Like