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)
COMMUNITY QUESTION
Flashing light with keycard reader? Tried my best and it did not work
2 answers
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.
2 comments
0
Yeah, that's the problem. He doesn't know that .touched is completely deprecated.
0
Mate, I fixed it
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Well what the hell do you want help with? You can't just expect us to know. Use print statements, breakpoints and tell us how far it got into the script darn it/1
Already fixed it