whenever I try to add money or a win to my leaderboard, the output says "attempt to call a userdata value". My code is game.Players(vals.Winner.Value).leaderstats.Money.Value = game.Players[vals.Winner.Value].leaderstats.Money.Value +100
Am I doing anything wrong?
Its because your using normal brackets instead of the square ones the first time you try to reference vals.Winner.Value. It thinks your calling a function.
Hello. It errors because you weren't using square brackets, and game.Players()
will make the game think you're trying to call game.Players
just as if it was a function. Try this:
game.Players[vals.Winner.Value].leaderstats.Money.Value = game.Players[vals.Winner.Value].leaderstats.Money.Value +100