I am wondering how do you make it so when a person says something specific in chat a door will open?
✓ ANSWER ACCEPTED
When you say something spasific in chat a door will open?
1 answer
✓ Accepted answer
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.
6 comments
0
Ok I will try it.
0
Also now I know what nil means. Thx
0
Thx. It worked
0
"Workspace" and "connect" are both deprecated. Change them to "workspace" and "Connect". Also, use false instead of nil.
0
nil means that the object is nothing false is something diffrent
0
ok
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Did it