Help with Position.X not working

hello, i have a script that constantly checks if the player is with in the boundaries of the map by seeing if the humanoidRootParts.Position.Y is between 2 certain numbers which works fine, but when i try to check if the humanoidRootParts.Position.X is between 2 Certain numbers it wont work, any idea why? it keeps printing not in map which means its other, i double checked the numbers and they are correct, when i switch the Variables to Y and position.Y it works completely fine.

local Bottom = 22.392
local Top = 58.766

local Right = -50.753
local Left =- 189.853

local Side = 44.978
local Side1 = 226.277

while wait() do
	local Player = game.Players.LocalPlayer
	local Character = Player.Character
	
	local RootPartPosY = Character.HumanoidRootPart.Position.Y
	local RootPartPosX = Character.HumanoidRootPart.Position.X
	local RootPartPosZ = Character.HumanoidRootPart.Position.Z

	if RootPartPosX >= Right and RootPartPosX <= Left then
		print("In Map")
	else
		print("Nott")
	end
end

Dont use such if statements for detecting if player is in region. I suggest you use Region3 or WorldRoot:GetPartsInPart()