Localscript see textbox input as blank

I am making a Admin Panel Gui that kicks player
But When i typed “RealingZeeKung” in textbox and click Kick

It’s Supposed to print this

Player Name RealingZeeKung

But it’s print this

Player Name 

Here’s the script

local OpenClose = script.Parent.OpenClose
local Panel = script.Parent.Panel

-- Open Close
OpenClose.MouseButton1Click:Connect(function()
	Panel.Visible = not Panel.Visible
end)

-- Panel

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local AdminPanel = ReplicatedStorage:WaitForChild("AdminPanel")
local Kick = Panel.Kick
local Ban = Panel.Ban
local Unban = Panel.Unban
local Target = Panel.Target.Text
local Reason = Panel.Reason.Text

Kick.MouseButton1Click:connect(function()
	AdminPanel:FireServer("Kick", Reason, Target)
	print("Player Name "..Target)
end)

Have you assigned the panel text to the players name? If your reading the panel text and returning it as your Target you’d assume Panel.Target.Text is returned nil meaning it has no text.

2 Likes

Hi! I think I know the problem, you are making the the text as a variable, so it would only count 1 time, so I think what you should do is print("Player Name"..Panel.Target.Text) , it should work well.

2 Likes

It worked! Thank you very much!!

1 Like

No problem!:slight_smile: If you have any other problems related to scripting be sure to tell us!

1 Like