I am haveing a hard time doing a textboxgui I'm working on a admin gui And it has a kick function How would I link it togher with a Textbox So it would be like if a hacker ect was in the server and I open the admin I write the players name and it would kick them How would I do this?
COMMUNITY QUESTION
Hi I need help for Textbox?
1 answer
local textBoxWithPlayerName = script.Parent.TextBox
local buttonToKick = script.Parent.TextButton
buttonToKick.MouseButton1Down:connect(function()
local player = game.Players:FindFirstChild(textBoxWithPlayerName.Text)
if player ~= nil then
player:kick("Don't exploit, skrub.")
else
print("Player not found.")
end)
3 comments
0
I did this without studio, so it might be missing something. :p
1
Thank you so much You forgot one end But i got it But thanks :>
0
You're welcome.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Textbox? Textbox is for users to enter strings. Plus, if a hacker enters your game, it will be too late before you could detect and kick em. I recommend you taking a different approach on this