So I have this admin gui, and there's a text button and box to change a player's rep (leaderstat), but when I type in the value in the text box and press the button, it just changes the rep to 0. Here's the script.
function clicked4()
local plr = game.Players:FindFirstChild(k.Text)
local plrRep = plr.leaderstats.Reputation
if plr ~= nil then
plrRep.Value = r.Text else if
plr == nil then
o.Text = k.Text.." does not exist."
end; end; end
script.Parent.adminOpen.addRep.MouseButton1Down:connect(clicked4)

1 comment
It doesn't work, all it does is say "Player1 is not a number".