Hello, developers. I tried making a message system. Basically, when a player steps on the block and says something, their chat will be broadcasted in a message.
However, when the player wants to chat something new, it doesn’t put that on a message. When you go off and back on the block, it displays the past message instead of displaying nothing.
Here is my code. (Yes I will filter it)
local msg = Instance.new("Message",workspace)
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
script.Parent.Touched:Connect(function()
msg.Text = message
wait(2)
msg.Text = ""
end)
end)
end)