So I've wanted to make a tool that when clicked while holding it, a leaderstat would change, how would I exactly do this?
✓ ANSWER ACCEPTED
How would I make a tool that changes a leaderstat when used?
1 answer
✓ Accepted answer
Make a localscript in the tool and you could use this script:
local Tool = script.Parent
local Player = game.Players.LocalPlayer
local Leaderstats = Player:WaitForChild("leaderstats")
Tool.Equipped:connect(function()
Tool.Activated:connect(function()
Leaderstats.SomeStringValue.Value = SomeValue
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Also how would I make it so let's say if a certain stat is a certain value(Ex. 2), it then does a different value then a set value in that local script?