I have this script using chat to open the door But I can't make close door when we said close
local command = ":open"
local unlocked = false
local whiteList = {
["Megadude1536"] = true;
[1] = true;
}
local door = script.Parent
game.Players.PlayerAdded:connect(function(player)
if ((whiteList[player.Name]) or (whiteList[player.userId]) or (player.userId == game.CreatorId) or (unlocked)) then
player.Chatted:connect(function(input)
if ((input:lower() == command:lower()) and (door.CanCollide)) then
door.CanCollide = false
door.Transparency = 1
wait(2)
door.CanCollide=true
door.Transparency = 0
end
end)
end
end)
can you fix this script:
- The door will not close if we not said ":close"

4 comments
So you're wanting to make a close command as well? What exactly is wrong with this script in particular?
Nothing seems wrong with this script. You just didn't put anything in there for a ":close". However, it does look like the door opens then automatically closes after 2 seconds, so do you need a close command?
Yes
Here's the deal, you have already done half the work assuming this is your script, your own original content. All you would need to do is change the command, flips the trues with false, and flip the transparencies. So you're basically requesting we do the other half of the work for you?