Attempt to concatenate string with Instance

I’m trying to make an admin panel but I’m getting an error that says "attempt to concatenate string with Instance ". I fully understand why the error is occurring but I don’t know how to fix it.

local target_player = target.Text  -- this is a text box
if selected_command == "Kick" and execute_db == false then
	execute_db = true
	local t_player = game.Players:FindFirstChild(target_player) -- the error is occurring because this is a string
	if t_player then
		t_player:Kick("You have been kicked by "..player) 

use player.Name, you can’t concatenate a string with an instance
t_player:Kick("You have been kicked by "..player.Name)

2 Likes