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

Why wont my airport card door work?

Asked by 5 years ago
print(2)
local door1 = script.Parent.Parent.Door1
local door2 = script.Parent.Parent.Door2

script.Parent.Touched:Connect(function(hit)
    if hit.Parent.Name == "Eco" then
        print(1)
        door1.CanCollide = false
        door1.Transparency = 1
        print(1)
        door2.CanCollide = false
        door2.Transparency = 1
        wait(3)
        print(1)
        door1.CanCollide = true
        door1.Transparency = 0
        print(1)
        door2.CanCollide = true
        door2.Transparency = 0
    else 
        print(hit.Parent.Name)
    end

HELP ME!

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

no 1 should downvote us because we solved this in the community chat

print(2)
local door1 = script.Parent.Parent.Door1
local door2 = script.Parent.Parent.Door2

script.Parent.Touched:Connect(function(hit)
    if hit.Parent.Name == "Eco" then
        print(1)
        door1.CanCollide = false
        door1.Transparency = 1
        print(1)
        door2.CanCollide = false
        door2.Transparency = 1
        wait(3)
        print(1)
        door1.CanCollide = true
        door1.Transparency = 0
        print(1)
        door2.CanCollide = true
        door2.Transparency = 0
    else 
        print(hit.Parent.Name)
    end
end)
Ad

Answer this question