Mod Panel Open Script Difficulties

I’m trying to make a Mod Panel/Admin Command Panel that open and closes for only specific people.

I’ve correctly made the open script, but it opens for everyone due to it being just for when any Local Player chats “Open Panel”. How would I make this script below only work for specific players, I’ve tried multiple ways like editing the script, but it does not work?

CommandOpen = "Open Panel"
game.Players.LocalPlayer.Chatted:Connect(function(message)
	if string.match(CommandOpen, message) then
		game.Players.LocalPlayer.PlayerGui.GMS.ModPanel.Visible = true
	else return end

end)

You could check the UserID of the player, and if it doesn’t match a whitelisted player, return before doing anything else.

Also, I really don’t recommend using chat to open a UI :stuck_out_tongue:

Let me make myself a little bit clearer, I’m trying to implement the UserID, or Username into my script but I don’t know how to, and I’ve tried multiple times but failed.

The simplest way to achieve this would be having a hardcoded array of whitelisted players, then you could use the table.find function to see if the candidate player’s user ID is present in the array.

Now rethinking it I think I’m going to go with a button like other games I have seen. Thanks for giving input on the design if to use chat or something else. I appreciate the help.