Example: /say Hello!
then it checks the message after /say and it will be printed out in the developer console, I have no idea how I can make it. I wanted to make a /say script. you can type anything after /say and it will be printed out at the dev console. Thanks!
Wait, I know about this I just forgot ;-; but thanks for the quick respond!
local command = "/say " game.Players.PlayerAdded:Connect(function(Player) Player.Chatted:Connect(function(Chat) if string.sub(Chat, 1, 5) == command then local text = string.sub(Chat, 6) print(text) end end) end)
This is the solution!
this maybe idk
game.Players.PlayerAdded:connect(function(player) player.Chatted:Connect(function(message) if message == "/example" then --add a code elseif message == "/example2" then --add a code end end) end)