You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Hello! So i have {Door key Code}
1)So my idea is
Local Table_With_Accept_Cards = {Level_1, Level_2}
If player Tuch “Scanner” and put == Table_With_Accept_Cards then
Door open
- What is the issue? But problem is In Table i can put only 1 item Like
Part.BrickCollor = Color[1] or Part.BrickCollor = Color[2]
Not all Table
CODE
local KeyCardDoor = workspace.World:WaitForChild("Key Card Door")
local debounce = false
local door = KeyCardDoor.Door
local Scanner = KeyCardDoor.Scanner
local CardName_Accept = {
"Level_1",
"Level_2"
}
local function CheckDoorTest(hit)
if not debounce then
if hit.Parent.Name == CardName_Accept[] then
print("Accept")
door.CanCollide = false
door.Transparency = 0.5
debounce = true
wait(5)
door.CanCollide = true
door.Transparency = 0
debounce = false
end
end
end
Scanner.Touched:Connect(CheckDoorTest)
- What solutions have you tried so far? i Searh About “Mate Tables” and just Table but it’s not work:(