Bizarre behavior of tables and if-then not working in a custom dialog system

Hello! I’m having some serious issues with a custom dialog system I’m trying to implement.
So, to start off, I decided to make a modular Mario64 dialog system where a client event is fired with the text to say in the args section. However, I have come across two major issues.

  1. If a dialog is shorter than 4 lines, I would like the text box to disappear when you try to go to, say, the fourth page on a 3-page-long dialog. I intended to send a false bool to show that the dialog is over and the text box can be closed, but for whatever reason, the bool value goes through my check if it is false and tries to display on the text box, therefore ruining the script.

  2. The dialog box only works once before, after you close it, re-opening it will display the first line, then the third line, then the fourth, and then close. As you progress, it loses values until you’re left with just the first line, fourth line, close, first line, close. I have no idea why this is working (you can see some debug code in the line below and the full table is casting with all 4 values, but it still only shows the first line)

I am using a RemoveEvent as the DialogEvent item in the workspace. It casts 4 values, in this case, three strings and one bool.

local dialogevent = game.Workspace.DialogEvent
local textbox = script.Parent.TextLabel
local mouse = game.Players.LocalPlayer:GetMouse()

dialogevent.OnClientEvent:Connect(function(text1, text2, text3, text4)
	if not script.Parent.Enabled == true then
		local lineslist = {text1, text2, text3, text4}
		local currentline = 1
		print(lineslist)
		script.Parent.Enabled = true
		textbox.Text = text1
		mouse.Button1Down:Connect(function()
			currentline += 1
			if not lineslist[currentline] == false or currentline <= 4 then
				textbox.Text = lineslist[currentline]
			else
				script.Parent.Enabled = false
				currentline = 1
			end
		end)
	end
end)

This is really quite frustrating! If anyone understands what is wrong, please do tell.