I made script that should team me to tea, based on my rank group, but it teams me to random team, can someone help me fix this?
local Teams = game:GetService("Teams")
local Visitorst = Teams:WaitForChild("Visitors")
local LowRankt = Teams:WaitForChild("Low Ranks")
local MiddleRankt = Teams:WaitForChild("Middle Ranks")
local HighRankt = Teams:WaitForChild("High Ranks")
local SeniorHighRankt = Teams:WaitForChild("Senior High Ranks")
local HeadOfficet = Teams:WaitForChild("Head Office")
local Ownershipt = Teams:WaitForChild("Ownership Team")
local groupID = 16522602
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
local playerank = player:GetRankInGroup(groupID)
if playerank >= 253 then
player.Team = Ownershipt
elseif playerank >= 247 then
player.Team = HeadOfficet
print("Hello world")
elseif playerank >= 243 then
player.Team = SeniorHighRankt
elseif playerank >= 236 then
player.Team = HighRankt
elseif playerank >= 225 then
player.Team = MiddleRankt
elseif playerank >= 115 then
player.Team = LowRankt
elseif playerank >= 1 then
player.Team = Visitorst
end
end)
end)

2 comments
are there any errors in output?
No