ok so im learning to make tycoon type things now and the only part i am stuck on is the buy buttons, how would i find if the person touching it has the cash or not?
um i dont know about this tags thing, i never formally learned Lua so i dont know what most of them mean..
The following script will check to see if the player has cash above 300. If he does, then it will print "Success" in the output:
local RequiredCash = 300 script.Parent.Touched:connect(function(h) if h.Parent:FindFirstChild("Humanoid") then local p = game.Players:FindFirstChild(h.Parent.Name) if p.leaderstats.Cash.Value > RequiredCash then print("Success") end end end)