game.Players.PlayerAdded:connect(function(Player) if Player:GetRankInGroup(1024778)== 10 or 255 or 50 or 254 then game.Workspace.Brick1:Destroy() game.Workspace.Brick2:Destroy() else if Player:GetRankInGroup(1024778) == 1 or 0 then print("Rank too low!") end end end)
It is supposed to destroy two parts for people who have a high rank in the group (The game is FilteringEnabled) but it doesen't destroy the parts for any rank. I have been trying to figure out whats wrong with this for hours. I'm sorry if this is a dumb question.
255, 50 and 254 are numbers greater than 0, so the if statement will always be true. I think you just don't understand the basics. You are supposed to do this:
if this_is_true or this_is_true then
You are doing this:
if this_is_true or true or true or true then
tl;dr
if Player:GetRankInGroup(1024778)== 10 or Player:GetRankInGroup(1024778)==255 or Player:GetRankInGroup(1024778)==50 or Player:GetRankInGroup(1024778)==254 then