Hello,
All my questions keep getting closed I am a bad scripter don't know how to script that good. So I am here for you guys to tell me everything that's wrong with my script so I can get better and learn.
game.Workspace.sell.Part.Touched:Connect(function()
stat.Value = 25
end)
The stat value is the Bag value in my leaderboard I am trying to make it so when someone reaches 25 it will stops or if they go over and try to sell that they only get 25.

2 comments
I don't get what you are asking for, so when you touch a part, it sells up to a maximum of 25?
No if you have over 25 in your stat then it will only sell for 25 so something like what I did when you touch the sell brick it makes it so you get only 25 in your stat witch sells and you get 25 cash.