I have multiple scripts that have the card name in all of the places where I need the card name (you will see in the code snip-it I put) and I would delete the correct scripts to make it so the card would work with the specific cards I had.
Example:
OpenSound = script.Parent.Door1Parts.Door1.DoorOpen CloseSound = script.Parent.Door1Parts.Door1.DoorClose interval = 0.3 script.Parent.Button1.Button1.Touched:Connect(function(card) if card.Parent.Name == "Level1" then --Level1 is the level 1 card name as the tool. OpenSound:Play() script.Parent.Door1Parts.Door1.Transparency = 1 script.parent.Door1Parts.Door1.CanCollide = false script.Parent.Door1Parts.Door1_1.Transparency = 0 script.parent.Door1Parts.Door1_1.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_1.Transparency = 1 script.parent.Door1Parts.Door1_1.CanCollide = false script.Parent.Door1Parts.Door1_2.Transparency = 0 script.parent.Door1Parts.Door1_2.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_2.Transparency = 1 script.parent.Door1Parts.Door1_2.CanCollide = false script.Parent.Door1Parts.Door1_3.Transparency = 0 script.parent.Door1Parts.Door1_3.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_3.Transparency = 1 script.parent.Door1Parts.Door1_3.CanCollide = false script.Parent.Door1Parts.Door1_4.Transparency = 0 script.parent.Door1Parts.Door1_4.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_4.Transparency = 1 script.parent.Door1Parts.Door1_4.CanCollide = false script.Parent.Door1Parts.Door1_5.Transparency = 0 script.parent.Door1Parts.Door1_5.CanCollide = true script.Parent.Button1.ButtonLight1.BrickColor = BrickColor.new("Lime green") script.Parent.Button2.ButtonLight2.BrickColor = BrickColor.new("Lime green") wait(4) CloseSound:Play() script.Parent.Door1Parts.Door1_5.Transparency = 1 script.parent.Door1Parts.Door1_5.CanCollide = false script.Parent.Door1Parts.Door1_4.Transparency = 0 script.parent.Door1Parts.Door1_4.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_4.Transparency = 1 script.parent.Door1Parts.Door1_4.CanCollide = false script.Parent.Door1Parts.Door1_3.Transparency = 0 script.parent.Door1Parts.Door1_3.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_3.Transparency = 1 script.parent.Door1Parts.Door1_3.CanCollide = false script.Parent.Door1Parts.Door1_2.Transparency = 0 script.parent.Door1Parts.Door1_2.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_2.Transparency = 1 script.parent.Door1Parts.Door1_2.CanCollide = false script.Parent.Door1Parts.Door1_1.Transparency = 0 script.parent.Door1Parts.Door1_1.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_1.Transparency = 1 script.parent.Door1Parts.Door1_1.CanCollide = false script.Parent.Door1Parts.Door1.Transparency = 0 script.parent.Door1Parts.Door1.CanCollide = true script.Parent.Button1.ButtonLight1.BrickColor = BrickColor.new("Really red") script.Parent.Button2.ButtonLight2.BrickColor = BrickColor.new("Really red") end end) script.Parent.Button2.Button2.Touched:Connect(function(card) if card.Parent.Name == "Card" then script.Parent.Door1Parts.Door1.Transparency = 1 script.parent.Door1Parts.Door1.CanCollide = false script.Parent.Door1Parts.Door1_1.Transparency = 0 script.parent.Door1Parts.Door1_1.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_1.Transparency = 1 script.parent.Door1Parts.Door1_1.CanCollide = false script.Parent.Door1Parts.Door1_2.Transparency = 0 script.parent.Door1Parts.Door1_2.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_2.Transparency = 1 script.parent.Door1Parts.Door1_2.CanCollide = false script.Parent.Door1Parts.Door1_3.Transparency = 0 script.parent.Door1Parts.Door1_3.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_3.Transparency = 1 script.parent.Door1Parts.Door1_3.CanCollide = false script.Parent.Door1Parts.Door1_4.Transparency = 0 script.parent.Door1Parts.Door1_4.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_4.Transparency = 1 script.parent.Door1Parts.Door1_4.CanCollide = false script.Parent.Door1Parts.Door1_5.Transparency = 0 script.parent.Door1Parts.Door1_5.CanCollide = true script.Parent.Button1.ButtonLight1.BrickColor = BrickColor.new("Lime green") script.Parent.Button2.ButtonLight2.BrickColor = BrickColor.new("Lime green") wait(4) script.Parent.Door1Parts.Door1_5.Transparency = 1 script.parent.Door1Parts.Door1_5.CanCollide = false script.Parent.Door1Parts.Door1_4.Transparency = 0 script.parent.Door1Parts.Door1_4.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_4.Transparency = 1 script.parent.Door1Parts.Door1_4.CanCollide = false script.Parent.Door1Parts.Door1_3.Transparency = 0 script.parent.Door1Parts.Door1_3.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_3.Transparency = 1 script.parent.Door1Parts.Door1_3.CanCollide = false script.Parent.Door1Parts.Door1_2.Transparency = 0 script.parent.Door1Parts.Door1_2.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_2.Transparency = 1 script.parent.Door1Parts.Door1_2.CanCollide = false script.Parent.Door1Parts.Door1_1.Transparency = 0 script.parent.Door1Parts.Door1_1.CanCollide = true wait(interval) script.Parent.Door1Parts.Door1_1.Transparency = 1 script.parent.Door1Parts.Door1_1.CanCollide = false script.Parent.Door1Parts.Door1.Transparency = 0 script.parent.Door1Parts.Door1.CanCollide = true script.Parent.Button1.ButtonLight1.BrickColor = BrickColor.new("Really red") script.Parent.Button2.ButtonLight2.BrickColor = BrickColor.new("Really red") end end)
The button door is fine but these card doors aren't, please help?