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

I've been wondering why my code for my card door wont work for my game about SCPs?

Asked by 4 years ago

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:

001OpenSound = script.Parent.Door1Parts.Door1.DoorOpen
002CloseSound = script.Parent.Door1Parts.Door1.DoorClose
003 
004interval = 0.3
005 
006script.Parent.Button1.Button1.Touched:Connect(function(card)
007    if card.Parent.Name == "Level1" then --Level1 is the level 1 card name as the tool.
008 
009        OpenSound:Play()
010        script.Parent.Door1Parts.Door1.Transparency = 1
011        script.parent.Door1Parts.Door1.CanCollide = false
012        script.Parent.Door1Parts.Door1_1.Transparency = 0
013        script.parent.Door1Parts.Door1_1.CanCollide = true
014 
015        wait(interval)
View all 167 lines...

The button door is fine but these card doors aren't, please help?

0
Please do some debugging so we know where the problem is. raid6n 2196 — 4y
0
The problem is that after the level one keycard touches the part that is supposed to activate all of that code below isnt working. PurpleTheOval 2 — 4y

Answer this question