local player1 = game.Players:GetPlayers()[1] local player2 = game.Players:GetPlayers()[2] player1.Character.HumanoidRootPart.Position = Vector3.new(-115, 5.5, -97) player2.Character.HumanoidRootPart.Position = Vector3.new(-148, 0.5, -99) end end
This Code Works, it does what I need, but it looks through all the players in game, and not only to the ones that are inside the table
I tried the following code but it didn't work...
local player1 = playingPlayers[1] local player2 = playingPlayers[2]
playingPlayers is the Table
Someone Helped me with it on discord
The Working Code:
local player1 = game.Players:FindFirstChild(playingPlayers[1]) local player2 = game.Players:FindFirstChild(playingPlayers[2]) player1.Character.HumanoidRootPart.Position = Vector3.new(-115, 5.5, -97) player2.Character.HumanoidRootPart.Position = Vector3.new(-148, 0.5, -99)