send chat message lua roblox code example
Example 1: roblox lua on player chatted
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(msg)
-- do stuff with msg and player
end)
end)
Example 2: roblox send message script
game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer("message", "All")