I am trying to make a team selector for our game, and there is a team a player can join if they are level 1 in the group or not in the group at all. However, on an alt account, when I join the game not in the group it does not work (the button destroys), but if I am in the group it works.
I am using :GetRankInGroup to see if they are in or not in the group, and I have tried :IsInGroup and it is the same result.
The portion of the code giving me problems:
if v.Name == "Teamname" then
local rank = player:GetRankInGroup(ID)
if rank == 1 or 0 or player:IsInGroup(ID) == false then
print(slot, v.Name)
v.Position = stuff.Slots:FindFirstChild(slot).Position
slot = slot + 1
else
v:Destroy()
end
end
Still not working, but I can confirm that the GetRankInGroup == 1 part of the if statement is working, so it cannot be a problem with the actual if statement
if v.Name == "Teamname" then
local rank = player:GetRankInGroup(ID)
if rank == 1 or 0 or not player:IsInGroup(ID) then
print(slot, v.Name)
v.Position = stuff.Slots:FindFirstChild(slot).Position
slot = slot + 1
else
v:Destroy()
end
end