I'm learning script, kind of having trouble with this script. I believe I'm doing wrong...
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 == not "1337" then
script.Parent.Parent.Code.Text = "Incorrect"
script.Parent.Parent.Parent.Parent.Frame:TweenPosition(UDim2.new(-0.5, 0, 0.25, 0), "Out", "Elastic", 2.5)
end
end
end
script.Parent.MouseButton1Up:connect(codeentry)
I'm trying to make the text to say incorrect when you enter code that is not "1337"?

2 comments
Ignore the line 9 please..
Why not just remove the second if then statement? If the code is not 1337, there's no point in comparing what already is not 1337 to something else. Also, if you're going to use the not keyword, use it on an entire condition. Because not 1337 will not work.