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

How do I make a door open by chatting a specific keyword?

Asked by 4 years ago

I have just recently started building games thus I am quite new to the scripting processes, and I would like to know how to make a door open, temporarily, by typing a specific keyword in the chat.

1 answer

Log in to vote
0
Answered by
Aztralzz 169
4 years ago
Edited 4 years ago

Please provide explanation with your answers. Simply posting code does not spread knowledge of integral scripting processes which helps people understand the logic and reasoning behind your answer.

Maybe this.

game.Players.PlayerAdded:Connect(function(player)
  player.Chatted:Connect(function(msg)
        if msg == "your message" then
    --input code for the door
    end
  end)
end)

I haven't tested this out. If this dosen't work, look above at the chats and click that link for further info about Player.Chatted, but what this code does is when the player chats the set message it fires the Chatted event to open the door.

Ad

Answer this question