Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I add players to a table by getting them to touch a part, and teleport them to reserved game?

Asked by 5 years ago
Edited 5 years ago

I'm trying to teleport players from the lobby to the main game. I don't know how to get them to touch a part and once they touch it adds them to a table. I want there to be 8 players in the table for the teleport to commence.

I have no idea how to approach this can someone help me?

1 answer

Log in to vote
0
Answered by 5 years ago

Pseudocode

local players = {}

when someone/something touches the part
    check that the touching part belongs to a player character
        if part is from a player character then
           if there's less than 8 elements in the players table
               insert them into the table

Useful links

Ad

Answer this question