So few things you need to know
- When you click a union it is supposed to give you 1 "Money"
- I already have a leaderboard script in the game
- It works on solo studio but not in a server, so I added a Wait for child, but it still doesn't work. I'm not sure how to fix it so I came upon this site and asked this question. Here is the script:
local Clicked = script.Parent:WaitForChild("ClickDetector")
Clicked.MouseClick:Connect(function(player)
game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value + 1
end)

4 comments
also are you using a Script or a LocalScript? You can not access the “LocalPlayer” property from a Script. ONLY
LocalScripts can access LocalPlayer, and never make a LocalScript a descendant of workspace unless under a Script
Thank you for your assistance, I had a feeling that it wasn't connected. Script works well now.
And I was using a script earlier, not a local script