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

I want to spread players around a "Map"?

Asked by 9 years ago

How can you set a table_variable that stores many positions, and teleports players to the positions? Randomly. This is done with cframe.new, and torso changing positioning I believe, but if I'm wrong please do correct me.

1 answer

Log in to vote
1
Answered by 9 years ago
Positions = {CFrame.new(0,0,0),CFrame.new(0,0,0),CFrame.new(0,0,0)} -- Positions (You will need as many positions as the max players in your game just to make sure it doesn't error)

for i,v in pairs(game.Players:GetPlayers()) do -- Gets the players
    v.Character.Torso.CFrame = Positions[i] -- Moves the player to one of the set positions
end

This is how you would do this, but this is not a request site so next time please attempt it first before posting.

~ Aaron

Ad

Answer this question