So I've been trying to do it myself, but I'm not that good at scripting just yet. I was wondering how you put a strength cap in a leaderstat, so I want the cap to be 1 Billion. But I'm not sure how to do it.
Try something like:
-- if the strength of the player is less than or equal to 999,999,999 if(player.leaderstats.strength <= 999999999)then -- add 1 to their strength (1,000,000,000) player.leaderstats.strength = player.leaderstats.strength + 1; else -- if this is the path the script takes, the player's strength is at least 1,000,000,000 end
Edit: Try:
player.leaderstats.strength.Changed:connect(function(newvalue) -- whenever the value is changed, clamp it between 0 and 10^9; player.leaderstats.strength.Value = math.clamp(newvalue, 0, 1000000000); wait(); end)
while true do if player.leaderstats.strength.Value > 1000000000 then player.leaderstats.strength.Value = 1000000000 wait(1) end