#Teleport to multiple parts

3 messages · Page 1 of 1 (latest)

frigid mulch
#

i have a script to teleport the player to a part named TPP "Character:PivotTo(game.Workspace.TPP)" but if I want to place multiple parts and have it teleport to a random one how can I do that?

pale finch
#

Hi get all your parts in a table via folder:GetChrildren() or manually add them

#

Then to pick a random one do table[math.random(#table)]