✓ Accepted answer
You need to learn how to do this first instead of going straight to scriptinghelpers to ask others to make a script for you. I'll just explain how it works. I have two scripts (LocalScript and server Script), and I have a RemoteEvent in ReplicatedStorage.
Local Script
local player = game.Players.LocalPlayer
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = "Leaderstats"
local points = Instance.new("IntValue",leaderstats)
points.Name = "Points"
tool = script.Parent
tool.Activated:Connect(function()
game.ReplicatedStorage.RemoteEvent:FireServer()
Server Script
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
local newValue = player.Leaderstats.Points.Value + 1
player.Leaderstats.Points.Value = newValue
If you'd like, you can add a debounce so players don't spam.
Hope this helps!
2 comments
Thank you @LoveSpeaksOutTruth, but where is the best place to learn to script more?
I always like to go to the Roblox Developer Hub. Tutorials are always great too if you learn better by listening and watching. There's also scriptinghelpers. I know I said that you shouldn't ask a question without showing your attempt to solve it. What I mean is you could always look up questions similar to the one you have and it may be answered by a response to someone else's question.