Hello!
I’ve been making a minigame-round based game recently.
How the game calculates the players is:
There’s a folder in Lighting that when the round starts, it gets all the players and creates an IntValue for each player, being the IntValue’s name, the playername.
When a player dies, its value gets deleted from the folder in Lighting. Finally the script checks how many values are there in Lighting and just checks for each’s players value to give them 15 points in the leaderstats.
I basically did this because at the time of making the game, I wasn’t really into tables so I just made my own system for it.
Now, I wanted to make a “get the most coins” minigame and, for it, I made it so when a player picks up a coin, its IntValue’s value in the Lighting folder increases. This is where the issue begins.
At the end of the round:
How would I detect which IntValue has the highest value of the folder, and make it return the player associated with it and its IntValue’s value?
I know all of this might be really complicated but its been bugging me out for a few days, thanks.