local team = game.Teams["team 1"]
local otherTeams = {};
table.insert(otherTeams, game.Teams["team 2"]);
table.insert(otherTeams, game.Teams["team 3"]);
table.insert(otherTeams, game.Teams["team 4"]);
table.insert(otherTeams, game.Teams["team 5"]);
table.insert(otherTeams, game.Teams["team 6"]);
table.insert(otherTeams, game.Teams["team 7"]);
table.insert(otherTeams, game.Teams["team 8"]);
script.Parent.Touched:Connect(function(hit)
if hit.Name == "potatohitbox" then
print("yes")
hit.Parent:Destroy()
workspace.potatoyesyes.Position = workspace.potatoyesgo1.Position
workspace.potatoyesgo1.victoryroyale.EmitterSize = 1.5
workspace.potatoyesgo1.victoryroyale.Playing = true
local plrsOnTeam = team:GetPlayers()
local plrsOnOtherTeam = otherTeams:GetPlayers()
wait(2)
for i, v in pairs(plrsOnTeam) do
v.Character.HumanoidRootPart.Position = Vector3.new(89.6, 288.4, 392.5)
end
for i, v in pairs(otherTeams) do
v.Character.HumanoidRootPart.Position = Vector3.new(90.1, 280, 448.5)
end
end
end)
the error is
attempt to call a nil value
line 18 where it says
local plrsOnOtherTeam = otherTeams:GetPlayers()
im basically trying to teleport the team to the winner section and the other team to the losers section