local a = 0
local equip = 0
CGUI = script.Parent.Parent.Classes.Backing
CGUI.Swordsman.MouseButton1Click:connect(function()
equip = a + 1
CGUI.Value.Value = equip
CGUI.Swordsman.TL.Text = "Selected"
for _,Player in pairs(game.Players:GetPlayers()) do
if Player:FindFirstChild("leaderstats") then
Player.leaderstats.value.Value = script.Parent.Backing.Value.Value
end
end
end)
When someone presses a gui button it gives the person a leaderstat value of 1, but when someone presses the button everybody gets a leaderstat value of 1. How would I only apply the value to the person who clicked the button?

2 comments
When this button is clicked, do you want the leaderstat value of the player who clicked it to go up, or just that of a random player?
yes