I am making a town/city game, and I am currently working on the neighborhood, and I am not a good scripter. I built a house but I have a script that tells you how much money you have. But when you buy the house you spend some money. You start off automatically with 1000 dollars. But each house will cost 300 dollars. Here is the script I have so far but I don't think it is correct please help me
function moneyvalue(player)
local stats = Instance.new("IntValue")
stats.Name = "Leaderstats"
local c = Instance.new("IntValue")
c.name = "Money"
c.value = 300
c.parent = stats
stats.parent = player
newPlayer.Change:connect (function (property)
end)
end
game.Players.ChildAdded:connect (Playerboughthouse)
Thank you, Tristen126

1 comment
I tested it, it worked I am just now confused how to use it e.o