Like you want to give a player a leader stat everytime they click a part/gui
1 | mousebutton 1 down( function () |
2 | -- [ giving the player 1 leader stats when they click ] |
I'm not good with stuff like this so help would be appreciated :D
01 | -- In a local script in the gui |
02 |
03 | game.ReplicatedStorage.GiveMoney:FireServer() -- Change "GiveMoney" to the name of your event in ReplicatedStorage |
04 |
05 | -- [ I am also guessing you have leaderstats. |
06 |
07 | In a server script in ServerScriptService --] |
08 |
09 | game.ReplicatedStorage.GiveMoney.OnServerEvent:Connect( function (player) |
10 | player.leaderstats.cash.value = player.leaderstats.value + 100 -- Change cash to your leaderstat and 100 to what amount you want. |
11 | end ) |
Using events btw.