Hello there! I'm learning to script, of course I have trouble with this one! :-(
How do you script, If you enter wrong code 3 times then the boolvalue = true,
Is it proper to use this line? repeat until time(3) script.Parent.Parent.Code.Text = "You submitted three wrong code, this building is now lockdown" workspace.Lockdown.BoolValue.Value = true
function codeentry()
if script.Parent.Parent.Code.Text == "1337" then
script.Parent.Parent.Code.Text = "Correct"
wait(2)
script.Parent.Parent.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.5, 0, 0.25, 0), "Out", "Elastic", 2.5)
else
if script.Parent.Parent.Code.Text >= "1337" then
script.Parent.Parent.Code.Text = "Incorrect"
repeat until time(3)
script.Parent.Parent.Code.Text = "You submitted three wrong code, this building is now lockdown"
workspace.NationalAssemblyAlarm.Code2.Value = true
end
end
end
script.Parent.MouseButton1Up:connect(codeentry)

3 comments
Thank you for re-writing, I'm not that kind advanced yet lol. There is a problem within line 6, ---- ERROR >>>> Players.Player1.PlayerGui.DeactiveAlarmGUI.Frame.SecurityNote.Entry.Script:6: attempt to compare boolean with number 10:27:31.037 - Stack Begin 10:27:31.039 - Script 'Players.Player1.PlayerGui.DeactiveAlarmGUI.Frame.SecurityNote.Entry.Script', Line 6 10:27:31.040 - Stack End
Never mind, I fixed it, you just need to add ( Count >= 3) heh.
Lol, glad you caught the error yourself, and I'm glad it worked. ;)