Well, you just need to find your leaderstats inside of the local player
function Clicked()
game.Players.LocalPlayer.leaderstats.Faction.Value = game.Players.LocalPlayer.leaderstats.Faction.Value + 1
end
script.Parent.MouseButton1Down:connect(Clicked)
then add the value.
You can also do that way
local player = game.Players.LocalPlayer
local leaderstats = player:WaitForChild("leaderstats")
local Faction = leaderstats:WaitForChild("Faction")
function Clicked()
Faction.Value =
Faction.Value + 1
end
script.Parent.MouseButton1Down:connect(Clicked)
I dont know if the second one is working cause i didnt tested, but should work
1 comment
Is it on a LocalScript or a Server Script?