Chat (Method): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>ArceusInator
yeah
 
Adding categories
 
(50 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<onlyinclude>{{Method
There are two Chat methods:
|name                = Chat
 
|arguments            = [[Instance]] ''head'', [[String]] ''message'', [[ChatColor]] ''ChatColor''
{{:Chat (Method)/Chat}}
|returns              = [[nil]]
<div class="visualClear"></div>
|description          = Makes the ''head'' say ''message'' in the ''ChatColor'' tone.
{{:Chat (Method)/Players}}
|object              = Chat
|protected            = Yes
}}</onlyinclude>
{{clear floats}}
[[Category:Methods]]
[[Category:Methods]]
{{Example|
If using the [[Command Bar]] or a [[CoreScript]]...<pre>
game:GetService( "Chat" ):Chat( Workspace.Player.Head, "This is a chat!", Enum.ChatColor.Blue )
-- makes Player's Head chat "This is a chat!" in the neutral tone</pre>
If using a [[Script]] or [[LocalScript]]...<pre>
game:GetService( "Chat" ):Chat( Workspace.Player.Head, "This is a chat!", Enum.ChatColor.Blue )
--> s Chat</pre>}}

Latest revision as of 22:32, 17 April 2023

There are two Chat methods:

Chat( Instance partOrCharacter, string message, ChatColor color = Blue )
Returns nil
Description: Makes partOrCharacter have a dialog-like billboard containing message in the color tone.
Member of: Chat
Chat( string message )
Returns nil
Description: Makes the local player chat the message message.
Member of: Players