how can i send a system message back like "not found" on the chat when i enter a command?
Asked by
5 years ago Edited 5 years ago
i tryed this but get back the channel is nil and the warn is only for server message for output
01 | local AdminCommands = require( 1163352238 ) |
02 | local Utilities = AdminCommands.Utilities |
04 | local ZombyGame = "/zombie " |
06 | local function onOwnerChatted(player, message, channel) |
08 | if message:sub( 1 , ZombyGame:len()):lower() = = ZombyGame:lower() then |
10 | local aMessage = message:sub(ZombyGame:len() + 1 ) |
12 | if aMessage = = "on" then |
14 | local zombiegame = game.ReplicatedStorage.MiniGames:FindFirstChild( "ZombieGame" ) |
18 | zombiegame.Parent = workspace |
23 | channel:SendSystemMessage ( "Not Found" ) |
29 | if aMessage = = "off" then |
31 | local zombiegame = workspace:FindFirstChild( "ZombieGame" ) |
35 | zombiegame.Parent = game.ReplicatedStorage.MiniGames |
40 | channel:SendSystemMessage ( "Not Found" ) |
49 | local function onPlayerAdded(player) |
54 | if player.UserId = = game.CreatorId and game.CreatorType = = Enum.CreatorType.User or player.Name = = Name and player.UserId = = Id then |
55 | player.Chatted:Connect( function (...) |
56 | onOwnerChatted(player, ...) |
63 | for _, player in pairs (Players:GetPlayers()) do |
66 | Players.PlayerAdded:Connect(onPlayerAdded) |
i did have made my own channel and this script is a normale script in ServerScriptService