My script was working fine, now it’s just broken now. What it is meant to do is that if the player is in the group but is between the rank 244-248 they will get the name tag. It is not working for some reason and those who are underneath the rank 244-248 are still getting the tag.
local ServerStorage = game:GetService("ServerStorage")
local Tag = ServerStorage.Tag
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
wait(0.1)
local CloneTag = Tag:Clone()
local NameTag = CloneTag.NameTag
local RankTag = CloneTag.SubRegTag
local head = char:WaitForChild("Head")
local rankta = head:FindFirstChild("Tag")
local ranktag = rankta:FindFirstChild("SubRegTag")
if player:GetRankInGroup(15323353) >= 244 or player:GetRankInGroup(15323353) <= 248 then
ranktag.Visible = true
ranktag.BackgroundColor = BrickColor.new("Neon orange")
ranktag.Text = "[OTS] "..player:GetRoleInGroup(15323353)
elseif player:GetRankInGroup(15350427) >= 245 or player:GetRankInGroup(15350427) <= 248 then
ranktag.Visible = true
ranktag.BackgroundColor = BrickColor.new("Teal")
ranktag.Text = "[AIRC] "..player:GetRoleInGroup(15350427)
end
end)
end)