Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Hi I need help for Textbox? [closed]

Asked by 9 years ago

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?

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 Im_Kritz 334 — 9y

Closed as Not Constructive by Perci1, docrobloxman52, and User#5978

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 9 years ago
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)


0
I did this without studio, so it might be missing something. :p SimplyRekt 413 — 9y
1
Thank you so much You forgot one end But i got it But thanks :> michaelbuck123 0 — 9y
0
You're welcome. SimplyRekt 413 — 9y
Ad