Force Tween Move a player to a random position thats available from an array of positions

This idea is similar to the one used in the presentation experience when a player joins. I am pretty new to coding so how would one make something like this? are there any resources I can have a look at?

It seems pretty straightforward, you create the array of positions either:

  • defining it yourself

  • create a collection of base parts. Loop through the collection and store the positions in an array.

To get the random position you should use math.random(1, #array) as the index.

To access a value in an array you can do array[index] in this case the index will be math.random(1,#array)

Since you want positions that are available, i’d suggest you create a collection of base parts as the positions and use attributes to detect whether they are occupied or not.