1 | door = script.parent |
2 | msg = string.lower(msg) |
3 | if (msg = = "open" ) then |
4 | door.Transparency = 1 |
5 | door.CanCollide = false |
6 | wait( 4 ) |
7 | door.Transparency = 0 |
8 | door.CanCollide = true |
9 | end |
I'm trying to make this script open a door, then close it, but so far- No luck. Any input would be helpful, thank you!
01 | door = script.Parent |
02 |
03 | game.Players.PlayerAdded:connect( function (player) |
04 | player.Chatted:connect( function (msg) |
05 | if msg = = "open door" then |
06 | door.Transparency = 1 |
07 | door.CanCollide = false |
08 | elseif msg = = "close door" then |
09 | door.Transparency = 0 |
10 | door.CanCollide = true |
11 | end |
12 | end ) |
13 | end ) |