I was making a rank gear script and it gives you a keycard according to your team, but when I join the team nothing happens, I made sure the rank and group were good and still doesn’t work.
Script:
game.Players.PlayerAdded:Connect(function(plr)
if plr.TeamColor == BrickColor.new("Toothpaste") then
if plr:GetRankInGroup(6136064) == 3 then
local sctool = game.ReplicatedStorage["Level 2 Card"]:Clone()
sctool.Parent = plr:WaitForChild("Backpack")
elseif plr:GetRankInGroup(6136064) == 4 then
local sctool2 = game.ReplicatedStorage["Level 3 Card"]:Clone()
sctool2.Parent = plr:WaitForChild("Backpack")
elseif plr:GetRankInGroup(6136064) == 5 then
local sctool3 = game.ReplicatedStorage["Level 4 Card"]:Clone()
sctool3.Parent = plr:WaitForChild("Backpack")
elseif plr:GetRankInGroup(6136064) == 6 or plr:GetRankInGroup(6136064) == 7 then
local sctool4 = game.ReplicatedStorage["Level 5 Card"]:Clone()
sctool4.Parent = plr:WaitForChild("Backpack")
elseif plr:GetRankInGroup(6136064) == 8 or plr:GetRankInGroup(6136064) == 9 or plr:GetRankInGroup(6136064) == 255 then
local sctool5 = game.ReplicatedStorage["Omni Card"]:Clone()
sctool5.Parent = plr:WaitForChild("Backpack")
end
end
end)