Why isn't my player teleporting?
So, I'm making a racing game of 8 players, and I'm trying to test something to make a player teleports to a selected position.
Like: Player 1 from the 8 players teleports to (0, 50 , 0) and Player 2 from the 8 players to (0, 100, 0) player 3 from 8 players to... the whole time until Player 8 has teleported to the selected position.
But in my output stands: "Player1 is not a valid member of Workspace" (and other 7 too.)
And here is my script:
02 | game.Workspace.Player 1. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 50 , 0 )) |
04 | game.Workspace.Player 2. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 100 , 0 )) |
06 | game.Workspace.Player 3. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 150 , 0 )) |
08 | game.Workspace.Player 4. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 200 , 0 )) |
10 | game.Workspace.Player 5. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 250 , 0 )) |
12 | game.Workspace.Player 6. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 300 , 0 )) |
14 | game.Workspace.Player 7. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 350 , 0 )) |
16 | game.Workspace.Player 8. HumanoidRootPart.CFrame = CFrame.new(Vector 3. new( 0 , 400 , 0 )) |
I hope you can help me with this!
Good luck!
-Gamer_io