I have tried to make a onChatted script however, I keep on failing. Please help me.
Hi XMessi10,
I understand, I also had difficulty understanding how to do onChatted scripts before, so I made a simple onChatted script for you. Here ya are:
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if(msg == "") then -- do something end end) end)
Hope this helps! - war8989
Use the player.Chatted event. For example :
game.Players.Player.Chatted:connect(function(Message) print("game.Players.Player has said : "..Message) end)
If you're looking for some more example codes, the wiki has a whole article about chat commands : http://wiki.roblox.com/index.php?title=Chat_commands
I noticed that the tag was "LocalScripts", and these scripts must be global if you use .PlayerAdded (Pretty sure)
Closed as Not Constructive by evaera
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?