How to link text box contents with button actions

So i’m taking part in collab project of making an admin panel, other participant designed the UI and my job is to script in the functionality.
there’s a TextBox where you can enter player’s username and then you can click buttons to manipulate the user in question (i. e. Ban, Fling, Kick)
I looked wherever i could, but only info i found, is how to do it via chat, not via TextBox.
Any relevant help i could get, will be appreciated, also if additional info is needed, feel free to ask for it.

Imagining a button with label “Kick” .
when pressed get the text in the text box.
Look if the player exists(through Players Service).
If he does then fire a remote event to the server passing the Text of the textbox as an argument.

Pick up the call from the server and kick the player.

The part i don’t really get is how exactly do i get the text from text box.

Just store it in a variable after focus lost.

> Textbox.FocusLost:Connect(function() 
> 
> 
> local Text = Textbox.Text 
> if game.Players:FindFirstChild(Text) then
> RemoteEvent:FireServer(Text) 
> end
>   
> end)

This just gets the text in the textbox and looks through Players and if the player exists then it fires the remote event passing the player name as the argument.
The server picks up the call and kicks the player whose name was passed as the argument