How to fix DataStoreService Error

I’m trying to add a Leaderboard within my game, that has worked previously, but isn’t working now. I am getting the error,

“DataStoreService: MaxValueInvalid: MaxValue and MinValue must be integers.”

I’m not sure why this is happening, considering it hasn’t beforehand. Any Scripters out there willing to help a brother out?

1 Like

Is the whole reason for this because I use “math.huge” in GetSortedAsync?

I’m trying to make sense of the Data Store Forum, but I don’t really understand it. Data Stores | Documentation - Roblox Creator Hub

1 Like

Pretty sure it’s that. Reading the docs page, it is also pointless to add math.huge since its an optional argument that most likely defaults to no limit already

1 Like

So, would I in this instance just deleted math.huge? I want to make sure that my leaderboards don’t cap, so if I can add a no-limit instance that would be ideal.

1 Like

Yeah, just keep it as LeaderboardDataStore:GetSortedAsync(false, 100, -100) and it should have no cap, though I’m sure that the -100 is also not needed?

I tried just taking out math.huge, and keeping in both 100, -100, and it works great! Thank you so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.