How can I tell who pressed a button?
For example:
script.Parent.MouseButton1Click:Connect(function()
print("{player who pressed the button's name} has pressed the button")
game.Players.{player who pressed the button's name}.leaderstats.Cash.Value = 100
end)

2 comments
Sorry, I forgot to Lua button :)
Wrong MouseButton1Click is an element of a GuiButton and won't return player, as it's only clickable for the LocalPlayer also seen on the Page for it it doesn't return the player instance.https://developer.roblox.com/en-us/api-reference/event/GuiButton/MouseButton1Click