I made two serperate scripts, because then it only worked. The commands only work once. I need serious help.
Script One (Open Lobby)
--DO NOT CHANGE!!!
local isAdmin = {["bosswalrus"] = true, ["BrockHCCS"] = true, ["mac3na3na"] = true, ["ultimatedeathwolf"] = true, ["BJL008"] = true, ["bealot"] = true}
--Open Lobby Function
function onChatted(message, player)
--Open Lobby
if message == "open/lobby" and isAdmin[player.Name] then
game.Workspace.LobbyDoor.LobbyDoorPart.Transparency = 1
game.Worksapce.LobbyDoor.LobbyDoorPart.CanCollide = false
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)
Script Two (Close Lobby)
--DO NOT CHANGE!!!
local isAdmin = {["bosswalrus"] = true, ["BrockHCCS"] = true, ["mac3na3na"] = true, ["ultimatedeathwolf"] = true, ["BJL008"] = true, ["bealot"] = true}
--Open Lobby Function
function onChatted(message, player)
--Open Lobby
if message == "close/lobby" and isAdmin[player.Name] then
game.Workspace.LobbyDoor.LobbyDoorPart.Transparency = 0
game.Worksapce.LobbyDoor.LobbyDoorPart.CanCollide = true
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)
The commands only work once. I need serious help.

6 comments
I've attempted an estimated 15 times to make this work.
It may be stack-ending somewhere. Check the in-game Output (console) by pressing F9 in game, then click Server Console, it will tell you any errors in your code.
Oh yeah I forgot about that
Thank Line 9 and 14 on both scripts seems to be the problem.
Could you help me find the problem?
It says Disconnected Event Because Of Expectation aswell.