so i wanna make a admin gui that when a player types a command and then the player(s) then it will do that command with the argument but i dont know how to do that as i am not that experienced with this type of stuff. here is my script:

local Tb = script.Parent
local Re = script.Respawn

local function cmds(cmd, plr)
	if cmd == 'respawn' or 'Respawn' then
		if plr == 'me' or 'Me' then
			Re:FireServer("Respawn")
			wait()
			Tb.Text = ''
		end
	end
end


Tb.FocusLost:Connect(function(enterPressed)
	if enterPressed == true then
		--script
	end
end)

at line 17 i dont know what to put in, can somebody please help me and explain what i need to do because im completely lost.

2 comments

0

cmds(tb.Text, games.Players.LocalPlayer)

0

ok but i want it so i can do other players aswell and not just me