So I got yet another problem and I have ask some people on Discord but yeah that didn’t work. So the new problem I have is when you enter the card and it changes colors the colors are all whack and not what they are suppose to be.
When the lights are suppose to be green they are pink and when they are suppose to be medium stone grey they are dark stone grey.
Code -
local function LightChange(one,two,three)
script.Parent.Lights.Light_1.Color = Color3.new(one, two, three)
script.Parent.Lights.Light_2.Color = Color3.new(one, two, three)
script.Parent.Lights.Light_3.Color = Color3.new(one, two, three)
script.Parent.Lights.Light_4.Color = Color3.new(one, two, three)
script.Parent.Lights.Light_5.Color = Color3.new(one, two, three)
end
local function OpenDoor()
DoorOpen:Play()
LightChange(52, 168, 93)
AG:Play()
wait(4)
DoorClose:Play()
LightChange(163, 162, 165)
wait(1.5)
Cooldown = false
end
KeyArea1.Touched:Connect(function(touch)
if touch.Name == "CardColor" and Clearance[touch.Parent.Parent.Name] and not Cooldown then
Cooldown = true
OpenDoor()
elseif touch.Name == "CardColor" and Clearance[touch.Parent.Parent.Name] == false then
Cooldown = true
LightChange(255, 0, 0)
AD:Play()
wait(1)
LightChange(163, 162, 165)
Cooldown = false
end
end)
KeyArea2.Touched:Connect(function(touch)
if touch.Name == "CardColor" and Clearance[touch.Parent.Parent.Name] and not Cooldown then
Cooldown = true
OpenDoor()
elseif touch.Name == "CardColor" and Clearance[touch.Parent.Parent.Name] == false then
Cooldown = true
LightChange(255, 0, 0)
AD:Play()
wait(1)
LightChange(163, 162, 165)
Cooldown = false
end
end)