ChatService¶
Inherits Instance
Chat is a static class used for various actions regarding the chat.
Static Class
This object is a static class. It can be accessed like this: Chat.
Additionally, it cannot be created in the creator menu or with Instance.New().
Not newable
This object cannot be created by scripts using Instance.New().
Properties¶
ChatPredicate : () -> ()¶
A callback function that filters chat messages before they are displayed to players.
Chat.ChatPredicate = function(plr: Player, msg: string)
if msg == "miau" then
Chat:UnicastMessage("no miau allowed", plr)
return false
end
return true
end
Methods¶
BroadcastMessage → nil¶
Parameters: msg [ string ]
Sends a chat message to all players.
UnicastMessage → nil¶
Sends a chat message to a specific player.
Events¶
NewChatMessage¶
Fires when new chat message has been received from player
MessageReceived¶
Parameters: message [ string ]
Fires when new message has been received from either BroadcastMessage or UnicastMessage
MessageDeclined¶
Parameters: ``
Fires when message has been declined by the server