workspace.FullAdminOfficeLockdown.touched:connect(function(touch) repeat script.Parent.SurfaceLight.Enabled=false wait(0.5) script.Parent.SurfaceLight2.Enabled=true workspace["O5-XOffice"].BrickColor=BrickColor.Red() workspace["O5-XOffice"].Material="Neon" wait(0.5) script.Parent.SurfaceLight2.Enabled=false wait(0.5) script.Parent.SurfaceLight.Enabled=true workspace["O5-XOffice"].BrickColor=BrickColor.Gray() workspace["O5-XOffice"].Material="Neon" until I click a click detector end)
local bool = true local bool2 = true local clearance = { ["[SCP] Card-L5"] = false, ["[SCP] Card-L4"] = false, ["[SCP] Card-L3"] = false, ["[SCP] Card-L2"] = false, ["[SCP] Maksur"] = false, ["[SCP] Card-L1"] = false, ["[SCP] Card-Omni"] = false, ["[SCP] RS Card"] = false, ["[SCP] O5-2 Access Card"] = true } workspace.FullAdminOfficeLockdown.touched:connect(function(touch) if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then repeat script.Parent.SurfaceLight.Enabled=false wait(0.5) script.Parent.SurfaceLight2.Enabled=true workspace["O5-XOffice"].BrickColor=BrickColor.Red() workspace["O5-XOffice"].Material="Neon" wait(0.5) script.Parent.SurfaceLight2.Enabled=false wait(0.5) script.Parent.SurfaceLight.Enabled=true workspace["O5-XOffice"].BrickColor=BrickColor.Gray() workspace["O5-XOffice"].Material="Neon" until workspace.Baseplate.Anchored end end)
Updated script. Still need help
Capitalize .touched event perhaps? I don't know if that affects anything but I'm pretty sure it should.