In the shop when you buy something, if you dont have enough money instead of stopping you the leaderstat amount will go below zero, how do I stop this?
Im assuming for your script you did something a little like this
script.Parent.MouseButton1Click:Connect(function(player) player.leaderstats.stat.Value -= 30 -- 30 is just a placeholder value -- whatever the code is for when its bought end)
Instead you should do
script.Parent.MouseButton1Click:Connect(function(player) if player.leaderstats.stat.Value >= 30 then -- ">=" means greater than, or equal to player.leaderstats.stat.Value -= 30 -- put whatever code you want to activate when the item is bought end end)