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)

4 comments

0

Where is the script located at?

0

Inside of the Kick button. Username is a child of the Gui aswell as the reason and kick button

0

You are trying to kick a player from localscript, you're overriding "v", this is not FE compatible

0

Oh well, I fixed it.