I was trying to make a door in my game that can be opened by chat and that is what i did but it didn't work as i suspected and it wouldn't even tell me why in the logs. game.Players.PlayerAdded:connect(function(plr) if CheckTrainer(plr.Name) then repeat wait() until plr:findFirstChild("PlayerGui") script.TrainerGui:Clone().Parent = plr.PlayerGui plr.Chatted:connect(function(msg) if msg:lower() == "clear sim" then ChangeSim("NoSim") elseif string.sub(msg:lower(),1,4) == "run " then ChangeSim(string.sub(msg:lower(),5)) elseif msg:lower() == "end sim" then game.Workspace.Base.SimDoor.CanCollide = true game.Workspace.Base.SimDoor.Transparency = 0.5 game.Workspace.Base.a1.CanCollide = true game.Workspace.Base.a2.CanCollide = true game.Workspace.Base.a3.CanCollide = true game.Workspace.Base.a4.CanCollide = true game.Workspace.Base.a1.Transparency = 0.5 game.Workspace.Base.a2.Transparency = 0.5 game.Workspace.Base.a3.Transparency = 0.5 game.Workspace.Base.a4.Transparency = 0.5 for i, plr in ipairs(game.Players:children()) do if plr and plr.Character and plr.Character:findFirstChild("Torso") then if plr.Character.Torso:findFirstChild("Contour") then game:service("Debris"):AddItem(plr.Character.Torso:findFirstChild("Contour"), 0) end for w, wepz in pairs(plr.Character:children()) do if wepz:IsA("Tool") then game:service("Debris"):AddItem(wepz, 0) end end for w, wepz in pairs(plr.Backpack:children()) do if wepz:IsA("Tool") then game:service("Debris"):AddItem(wepz, 0) end end local spawns = game.Workspace.SimSpawns:children() if #spawns ~= 0 then local spn = spawns[math.random(1,#spawns)] if spn and plr.Character:findFirstChild("Torso") then plr.Character.Torso.CFrame = (spn.CFrame + Vector3.new(0,3,0)) end end end end elseif msg:lower() == "open lobby" then game.Workspace.Base.SimDoor.CanCollide = false game.Workspace.Base.SimDoor.Transparency = 1 elseif msg:lower() == "close lobby" then game.Workspace.Base.SimDoor.CanCollide = true game.Workspace.Base.SimDoor.Transparency = 0.5 elseif msg:lower() == "open arena" then game.Workspace.Base.a1.CanCollide = false game.Workspace.Base.a2.CanCollide = false game.Workspace.Base.a3.CanCollide = false game.Workspace.Base.a4.CanCollide = false game.Workspace.Base.a1.Transparency = 1 game.Workspace.Base.a2.Transparency = 1 game.Workspace.Base.a3.Transparency = 1 game.Workspace.Base.a4.Transparency = 1 elseif msg:lower() == "close arena" then game.Workspace.Base.a1.CanCollide = true game.Workspace.Base.a2.CanCollide = true game.Workspace.Base.a3.CanCollide = true game.Workspace.Base.a4.CanCollide = true game.Workspace.Base.a1.Transparency = 0.5 game.Workspace.Base.a2.Transparency = 0.5 game.Workspace.Base.a3.Transparency = 0.5 game.Workspace.Base.a4.Transparency = 0.5 elseif msg:lower():find("begin!") then if game.Workspace.CurrSim:findFirstChild("SimBegin", true) then game.Workspace.CurrSim:findFirstChild("SimBegin", true):Destroy() game.Workspace.Base.SimDoor.CanCollide = true game.Workspace.Base.SimDoor.Transparency = 0.5 end if game.Workspace.CurrSim:findFirstChild("SimBeginOpen", true) then game.Workspace.CurrSim:findFirstChild("SimBeginOpen", true):Destroy() end end end) end end)``

3 comments

0

Please edit this question to use proper code formatting. Also, explain what you're trying to do, and what happens.

1

Problem 1. Not in proper format, 2. No explanation..

0

How to do both of these things e.e