Script : local textBox = script.Parent.Parent.TextBox -- your textbox name local frame = script.Parent.Parent.Frame -- your frame name local correctCode = "Tutorial" -- put ur code local function openFrame() frame.Visible = true print("Frame opened!") end local function checkCode() if textBox.Text == correctCode then openFrame() else print("Incorrect code!") end end textBox.FocusLost:Connect(function(enterPressed, inputObject) if enterPressed then checkCode() end end)