How can I make this update for all ranks once I change it to like 100000?
If I were to change my networth to 6000, it skips all besides silver money bag?
05 | Bag = "Starter Money Bag" , |
09 | Bag = "Rookie Money Bag" , |
13 | Bag = "Silver Money Bag" , |
19 | local stats = p:WaitForChild( "Stats" ) |
20 | local leader = p:WaitForChild( "leaderstats" ) |
21 | local cash = stats.Cash |
22 | networth = stats.NetWorth.Value |
24 | local function updateRank(currentNetWorth) |
26 | for _, r in ipairs (ranks) do |
27 | if r.NetWorth > currentNetWorth then |
32 | if rank ~ = currentRank then |
33 | local _, lastBag = pcall ( function () return ranks [ i- 1 ] .Bag end ) |
35 | givebag(p, bag, lastBag or "none" ) |
40 | stats.NetWorth.Changed:connect(updateRank) |
41 | updateRank(stats.NetWorth.Value) |
Edited ~ tab your code properly