I am trying to make a script that kicks people when the name is entered in a text box. However after multiple layouts and attempts they all end up saying "NAME is not a valid member of Textbutton" please help because I am very stuck :) Thanks!
So the structure of my layout is
/> AdminGUI />ClickKick --Text Button />LocalScript />NAME -- Text Box
And the code is
local PLAYERNAME = script.Parent.NAME.Text
function click()
game.Players.PLAYERNAME:Kick("Kicked by server admin")
end
script.Parent.MouseButton1Down:connect(click)

2 comments
Ah, thanks :) it all worked however i had to change it to a 'Script' instead of a 'Local Script'
Updated it so that it will tell you if the player doesn't exist