how would i make it so the door doesn’t close after entering the code
if CurrentInput == tostring(Code) then
Display.TextLabel.Text = "CORRECT"
CurrentInput = ""
DoorOpen:Play()
for i=1,360 do
RunService.Stepped:Wait()
end
Display.TextLabel.Text = ""
DoorClose:Play()
elseif CurrentInput ~= tostring(Code) then
Display.TextLabel.TextColor3 = Color3.fromRGB(255, 95, 84)
Display.TextLabel.Text = "INCORRECT"
CurrentInput = ""
for i=1,60 do
RunService.Stepped:Wait()
end
Display.TextLabel.Text = ""
Display.TextLabel.TextColor3 = Color3.fromRGB(85, 255, 127)
how to make a door that has a password and a guide that says the numbers one by one
You can do this by removing DoorClose:Play:()
.
The final code will look like this:
if CurrentInput == tostring(Code) then
Display.TextLabel.Text = "CORRECT"
CurrentInput = ""
DoorOpen:Play()
for i=1,360 do
RunService.Stepped:Wait()
end
Display.TextLabel.Text = ""
elseif CurrentInput ~= tostring(Code) then
Display.TextLabel.TextColor3 = Color3.fromRGB(255, 95, 84)
Display.TextLabel.Text = "INCORRECT"
CurrentInput = ""
for i=1,60 do
RunService.Stepped:Wait()
end
Display.TextLabel.Text = ""
Display.TextLabel.TextColor3 = Color3.fromRGB(85, 255, 127)
I’m assuming you don’t want to close it after the code is correct.
Thanks, I will try that hope this works
system
(system)
Closed
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.