Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

after function how would you add +1 leaderstats to the player?

Like you want to give a player a leader stat everytime they click a part/gui

mousebutton1down(function()
--[giving the player 1 leader stats when they click]

I'm not good with stuff like this so help would be appreciated :D

1 comment

0

this website is for scripting help, NOT for script requests. there are plenty of tutorials on leaderstats

1 answer

-- In a local script in the gui

game.ReplicatedStorage.GiveMoney:FireServer() -- Change "GiveMoney" to the name of your event in ReplicatedStorage

--[ I am also guessing you have leaderstats.

In a server script in ServerScriptService --]

game.ReplicatedStorage.GiveMoney.OnServerEvent:Connect(function(player)
player.leaderstats.cash.value = player.leaderstats.value + 100 -- Change cash to your leaderstat and 100 to what amount you want.
end)

Using events btw.

1 comment

0

This may not be the way you want it, idk.

This discussion is preserved as it was. New answers, comments, and votes are closed.