diff --git a/sl_controller/commands.lua b/sl_controller/commands.lua index 0508ee2..f9ea61e 100644 --- a/sl_controller/commands.lua +++ b/sl_controller/commands.lua @@ -158,9 +158,9 @@ sl_controller.register_action("door", { local player = { get_player_name = function() return self.meta.owner end, } - if state == "open" then + if text == "open" then door:open(player) - elseif state == "close" then + elseif text == "close" then door:close(player) end end