I am making a keycard door from prison life 0.6, with my own code. Unfortunately adding the sound thing might have the problem, but I want it to play if the keycard touches the scanner.
Code:
script.Parent.Touched:Connect(function(hit)
if hit.Parent.Name == "Admissions Keycard" then
script.Parent.keyscanner.Union.CanCollide = false
script.Parent.keyscanner.Union.Transparency = 1
script.Parent.Sound.Playing = true
wait(2)
script.Parent.Sound.Playing = false
script.Parent.keyscanner.Union.CanCollide = true
script.Parent.keyscanner.Union.Transparency = 0
end
end)
Any fixes?
Note I want the "scan" part material to neon, then 2 seconds and go back to smoothplastic.

1 comment
Image of explorer: https://cdn.discordapp.com/attachments/505300456319221773/588298931906150410/unknown.png