Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to create custom commands?

Asked by 5 years ago
Edited 5 years ago

What I have so far:

game.Players:WaitForChild("MageMasterHD")
game.Players.MageMasterHD.Chatted:Connect(function (msg)
    if msg == "/test" then
        print (msg)
    end
end)

This works but I want the message if it is a command to be not sended

1 answer

Log in to vote
0
Answered by
HaveASip 494 Moderation Voter
5 years ago
game:GetService("Players").PlayerAdded:Connect(function(player)
    player.Chatted:Connect(function(msg)
        if msg == "/test" then
            print(msg)
        end
    end)
end)
Ad

Answer this question