Help with chat function

Two questions, one how do I make it so it prints the players name who ran the command? Right now it prints the name of client its being ran on. Also how would I make it so the chat msg only shows up for the player running the command?



usermessage.Hook("CDmsg", function()
	chat.AddText( Color(0,102,0, 255), "[Respawn] ", Color(255, 255, 255, 255), LocalPlayer():Nick().." You must be dead to use that command!")
end)


Any help would be greatly appreciated!

Err?

This is clearly client side code and the only reference you’re passing is that a umsg hook is being ran. Without more information it’s not really possible to help you.

Scratch that code then, here is what I need to do:

Display colored text in chat for a specific player.
Display colored text in chat for everyone, and also show the players name running that command.