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
