Player not kicked when they should be

I’m trying to make it so that whenever a player joins the game, the game checks if they are a certain rank in my group, if they aren’t they should get kicked.

The issue is, even if the player isn’t in the group and joins the game, the developer console displays that they are, and the player isn’t kicked from the game

I’ve tried to edit the script and do it different ways, but nothing seems to work. I’m confused and unsure of how I can fix this script. Help would be appreciated

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Here is the script

game.Players.PlayerAdded:Connect(function(Player)
	if Player:GetRankInGroup(14613552) == 2 or 3 or 4 or 254 or 255 then
		print("Player is cooler gamer or above in group nzjamie's bizarre games")
	else
		Player:Kick("Closed Beta restricts access to 'cooler gamer' or above in group 'nzjamie's bizarre games'. Sus Racing will publicly release May 2022")
	end
end)

if Player:GetRankInGroup(14613552) == 2 or 3 or 4 or 254 or 255 then
translates to
if Player:GetRankInGroup(14613552) == 2 or true or true or true or true then

You need to do them individually or reference a table.
For example,

if Player:GetRankInGroup(14613552) == 2 or Player:GetRankInGroup(14613552) == 3 or Player:GetRankInGroup(14613552) == 4 or Player:GetRankInGroup(14613552) == 254 or Player:GetRankInGroup(14613552) == 255 then

or

local AcceptedRanks = {2,3,4,254,255}
if Player:GetRankInGroup(14613552) and table.find( AcceptedRanks, Player:GetRankInGroup(14613552) ) then

or statements do not work like that. It would have to be

if Player:GetRankInGroup(14613552) == 2 or Player:GetRankInGroup(14613552) == 3 or etc then
end

Just use a >= check.

if Player:GetRankInGroup(14613552) >= 2 then
end

The fact that I hadn’t thought of this makes me disappointed of my incapability of simple scripts. Thanks for your help the script now works as intended!