Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Flashing light with keycard reader? Tried my best and it did not work

Asked by 6 years ago
01workspace.FullAdminOfficeLockdown.touched:connect(function(touch)
02        repeat
03            script.Parent.SurfaceLight.Enabled=false
04            wait(0.5)
05            script.Parent.SurfaceLight2.Enabled=true
06            workspace["O5-XOffice"].BrickColor=BrickColor.Red()
07            workspace["O5-XOffice"].Material="Neon"
08            wait(0.5)
09            script.Parent.SurfaceLight2.Enabled=false
10            wait(0.5)
11            script.Parent.SurfaceLight.Enabled=true
12            workspace["O5-XOffice"].BrickColor=BrickColor.Gray()
13            workspace["O5-XOffice"].Material="Neon"
14        until I click a click detector
15end)

2 answers

Log in to vote
0
Answered by 6 years ago
01local bool = true
02local bool2 = true
03local clearance = {
04    ["[SCP] Card-L5"] = false,
05    ["[SCP] Card-L4"] = false,
06    ["[SCP] Card-L3"] = false,
07    ["[SCP] Card-L2"] = false,
08    ["[SCP] Maksur"] = false,
09    ["[SCP] Card-L1"] = false,
10    ["[SCP] Card-Omni"] = false,
11    ["[SCP] RS Card"] = false,
12    ["[SCP] O5-2 Access Card"] = true
13}
14workspace.FullAdminOfficeLockdown.touched:connect(function(touch)
15    if touch.Name == "Handle" and clearance[touch.Parent.Name] and bool then
View all 30 lines...

Updated script. Still need help

0
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 CyroStorms 4 — 6y
0
Already fixed it tictac67 96 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

Capitalize .touched event perhaps? I don't know if that affects anything but I'm pretty sure it should.

0
Yeah, that's the problem. He doesn't know that .touched is completely deprecated. DeceptiveCaster 3761 — 6y
0
Mate, I fixed it tictac67 96 — 6y

Answer this question