Why is script not printing or doing anything

So im confused with this script, it’s suppose to be printing Error or fired if it’s working but it’s printing none of those, why?

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Parent.CreateFrame.Visible = false
	local hardcore = script.Parent.Parent.Hardcore.Value
	local Selected = script.Parent.Parent.SelectedMode.Value
	local level = script.Parent.Parent.LevelVal.Value
	local DungeonName = script.Parent.Parent.DungeonName.Text
	local GamesMade = script.Parent.Parent.Parent.GamesMade
	
	if Selected == "" then
		if level == "0" then
			if DungeonName == "" then
				print("Error")
				script.Parent.Parent.Errormsg.Visible = true
				wait(1)
				script.Parent.Parent.Errormsg.Visible = false
			else
				game.ReplicatedStorage.Events.CreateParty:FireServer(hardcore, Selected, level, DungeonName, GamesMade)
				print("Fired")
			end
		end
	end
end)

Probably cause of these 2 statements not checking if your Selected/level variables are equal to your strings you implemented, try adding else statements to those as well & print out those variables

so i have to add 3 else statements? I don’t understand

Well you should obviously print the Selected & level variables before you even start to make sure that they’re valid with your conditional statements

it prints blank then it prints 0 for level and then prints not selected

I just realized what i did wrong, i accidentally put “” on a number i did “0” instead of just 0

try this and check whats the highest number you will get
edit: i didnt see that you have already found the issue yourself

script.Parent.MouseButton1Click:Connect(function()
    print("1")
	script.Parent.Parent.Parent.CreateFrame.Visible = false
	local hardcore = script.Parent.Parent.Hardcore.Value
	local Selected = script.Parent.Parent.SelectedMode.Value
	local level = script.Parent.Parent.LevelVal.Value
	local DungeonName = script.Parent.Parent.DungeonName.Text
	local GamesMade = script.Parent.Parent.Parent.GamesMade
	
	if Selected == "" then
        print("2")
		if level == "0" then
            print("3")
			if DungeonName == "" then
				print("Error")
				script.Parent.Parent.Errormsg.Visible = true
				wait(1)
				script.Parent.Parent.Errormsg.Visible = false
			else
				game.ReplicatedStorage.Events.CreateParty:FireServer(hardcore, Selected, level, DungeonName, GamesMade)
				print("Fired")
			end
		end
	end
end)