Clicking an item to give ig money ?
So im working on a game that invovles clicking to get cash in the game but i cant seem to figure out how to connect these scripts
04 | for i = 1 ,#p:children() do |
05 | if p:children() [ i ] :IsA( 'BasePart' ) then |
06 | if (p:children() [ i ] .Size.x + p:children() [ i ] .Size.y + p:children() [ i ] .Size.z) < 25 then |
07 | local c = Instance.new( 'ClickDetector' , p:children() [ i ] ) |
08 | c.MouseClick:connect( function () |
And
3 | script.Parent.MouseClick:Connect( function (player) |
4 | if player:FindFirstChild( "leaderstats" ) and player.leaderstats:FindFirstChild( "Money" ) then |
5 | player.leaderstats.Money.Value = player.leaderstats.Money.Value + 500 |
can anyone help me figure out this issue Please and thank you