Expected 'end' (to close 'then' at line 13), got <eof>; did you forget to close 'else' at line 17

Short and simple. The title is the error code I get when I hover over the “ends”

local menu = game.StarterGui:WaitForChild("Menu")
local blur = game.Lighting:WaitForChild("MainMenuBlur")
local color = game.Lighting:WaitForChild("MainMenuColor")
local menuToggle = game.ReplicatedStorage:WaitForChild("MenuToggle")

local playerMod = require(game:GetService("Players").LocalPlayer.PlayerScripts:WaitForChild("PlayerModule"))
local controls = playerMod:GetControls()

local uis = game:GetService("UserInputService")

uis.InputBegan:Connect(function(input)

	if input.KeyCode == Enum.KeyCode.M then
		menuToggle:PropertyChangedSignal("Value"):Connect(function()
			if menuToggle.Value == true then
				print("true")
			else
				print("false")
		end
	end
end)

I’ve tried so many different combinations of “ends”, but it just keeps giving me issues. What did I do wrong?

You forgot a parenthesis after print("false") (line 18) and an end

		menuToggle:PropertyChangedSignal("Value"):Connect(function()
			if menuToggle.Value == true then
				print("true")
			else
				print("false")
				)
			end
		end
	end
end)

Is it supposed to be like this?

Oh thanks! I always have trouble with the “ends”

It autofilled them, but it still came up with errors. I probably already had messed something else up.