for _,model in pairs(game.ReplicatedStorage.ObjectFolder:GetChildren()) local Properties = model.PropertiesObj local price = Properties.Price.Value player.leaderstats.Cash:GetPropertyChangedSignal("Value"):Connect(function() if player.leaderstats.Cash.Value < price then repeat task.wait() until player.leaderstats.Cash.Value > price player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - price function() end end)
i want it to wait until player has enough money and perform the function
Make an if statement Example
if Value = 100 then script.Enabled = false end)
This was just an example on how to use an if
statement then disable script by doing Enabled = false
Hope this helps!!