Player can enter queue even though it's over max limit

This script makes it so it can limit the amount of people that can join. So like-

Lobby - Max Player 0/1

Player 1: Joins

Player 2: Joins

– Both players can’t leave

function Check()
	
	if #Parent.Adornee.Players:GetChildren() <= Parent.Adornee.Configuration:GetAttribute("MaxPlayers") then
		
		return true
	else
		return false
	end
	
end


TextButton.MouseButton1Click:Connect(function()

	script.Click:Play()

	if Player and Player.Character and Player.Character.Humanoid.Health > 0 and not Intermission then --#Parent.Adornee.Players:GetChildren() <=  Parent.Adornee.Configuration:GetAttribute("MaxPlayers")
		
		if Check() then
			
			Camera()

			Change_Text()

			AddPlayer()
			
		end

	end
end)

logic looks right … must be something wrong with this line …
Why would you pull this from a GetAttribute and not a Number.Value

Attributes are an easier way for values to be assigned to an object. I don’t think there is anything wrong with that line necessarily…

I took that out and it worked fine. thus the logic is right.
That line must be the problem in some way …

It must be the Attribute’s value… not the issue with Attributes itself

If it’s comming back a 0 yes … check what it comming back from that call with a print. It is a number value right …

Attributes have a set value… I don’t think this guy forgot to set the MaxPlayers to not be 0?