I am trying to make an admin panel, so when I type the name and reason and click the Kick button, The script gets the player from the text and kicks him I tried this script but I get the error in the title
localscript:
local Username = script.Parent.Parent.Username local Reason = script.Parent.Parent.Reason script.Parent.MouseButton1Click:Connect(function() local v = game.Players.LocalPlayer for i,v in pairs(game.Players:GetPlayers()) do local name = Username name.Text:Kick(Reason.Text) end end)
Tree:
CommandPanel(Gui) Background(Frame) Username(TextBox) Reason(TextBox) Kick(TextButton) Kick(LocalScript)