I have this code which changes the colour of a brick when clicked which works. How do I edit so that it adds cash to a players leaderstats when clicked.
My clickdetector brickcolour code:
game.Workspace.MyClickDetectorEvent.OnServerEvent:Connect(function() script.Parent.Parent.MyPart.BrickColor = BrickColor.Random() end)
Do i change the script.Parent.MyPart BrickColor output to make it adds cash to my leaderboard instead of changing the bricks colour?
I already have a leaderboard in my game with stats called "Cash" so do I have to type FindFirstChild Cash or something...
Thank You and Help is Appreciated

1 comment
Try a cash.Value = cash.Value + (1)