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

When you say something spasific in chat a door will open?

Asked by 6 years ago

I am wondering how do you make it so when a person says something specific in chat a door will open?

0
Did it ScrappyFriend77 34 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
local msgwanted = "INSERT TEXT HERE" --What they have to chat
local door = Workspace.door --Where ever it is.
game.Players.PlayerAdded:connect(function(player) --PlayerAdded, gets that player.
    player.Chatted:connect(function(msg) --Checks what the player says.
        if msg == msgwanted then --If they chatted the message wanted
            print("msgwanted is true") --Making Sure
        door.CanCollide = nil --or false
        wait(timeopen) --waits the time open
        door.CanCollide = true --Nobody else
    end
    end)
end)

There you go. I feel like I just gave you the script.

0
Ok I will try it. 10TheDragon10 7 — 6y
0
Also now I know what nil means. Thx 10TheDragon10 7 — 6y
0
Thx. It worked 10TheDragon10 7 — 6y
0
"Workspace" and "connect" are both deprecated. Change them to "workspace" and "Connect". Also, use false instead of nil. PyccknnXakep 1225 — 6y
View all comments (2 more)
0
nil means that the object is nothing false is something diffrent saSlol2436 716 — 6y
0
ok 10TheDragon10 7 — 6y
Ad

Answer this question