✓ Accepted answer
Next time use a lua button, and remote events.
-- Errors:--
Atleast make sure to use player:WaitForChild("leaderstats")
This player.leaderstats.Cash.Value + 10 will not replicate to the server. You need that for the stats to change for every client (user)
-- Tips
Use game.Players.LocalPlayer instead of that game.Players:FindFirstChild(hit.parent.Name)
-- Extra: --
Use the code example 1 below with a local script!
-- Code example 1, button script: --
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
game.Re
end)
-- Code example 2, remote event script: --
script.Parent.OnServerEvent:Connect(function(player)
player.leaderstats.Cash.Value += 10
end)