Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Hi I need help for Textbox?

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?

1 comment

0

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

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.