I'm making an admin panel where you can give or take away points from a player by putting their username and the amount in a text box and then it takes those inputs to set player value, but it's not taking the text. Here's the script:
script.Parent.MouseButton1Click:Connect(function()
local player = script.Parent.Parent.To.Text
local amount = script.Parent.Parent.Amount.Text
game.Players[player].rep.Value = amount
end)
that's just one of them but the rest don't work either and I'm pretty sure if I can get this one fixed I can fix them all. The text values just come back as nothing, and I proved this by putting
print(player, amount)
and it just came up as nothing and it gives the error " is not a valid member of Players". how do i fix this?

2 comments
This wouldn't work regardless due to FE.
You have to use this on the client because the text wont apply on the server. Use a localscript with this code, but then fire a remote event with the arguments to the server to cause the point loss