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

How to I make a tool that gives you a leaderstat when you click?

What I am saying is when you equip the item, you click and it will add to your leaderstats.

1 answer

✓ Accepted answer

Okay, make a LocalScript and put this in your tool.

local leaderstats = game.Players.LocalPlayer:WaitForChild("leaderstats") -- Put whatever you want here (whatever the name of your currency is) local cash = leaderstats:WaitForChild("Money")

local tool = script.Parent

local function onEquipped() cash.Value = cash.Value + 5 -- Put whatever number here end

tool.Equipped:connect(onEquipped)

Tell me if this works, I'm pretty sure it will.

2 comments

0

The onEquipped event isn't a click.... Also use codeblocks please. And don't spoonfeed scripts liks this.

0

You shouldn't answer questions that go against the guidelines of this site.

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