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

How do I spawn with coordinates?

Asked by 9 years ago
for i = 1, # players do
players[i].Character:MoveTo(Vector3.new(­-53.723, 346.569, 91.323))

That will make the players spawn in a certain place. If I add more coordinates will they be able to spawn in a different place, because I don't want everyone spawning at the same spawn. Its a survival game so it needs to all be spread out. Thanks...

1 answer

Log in to vote
4
Answered by
LostPast 253 Moderation Voter
9 years ago

use math.random()

so:

for i = 1, # players do
players[i].Character:MoveTo(Vector3.new(­math.random(-53.723,-40),­ math.random(300,346.569), ­math.random(80,91.323)))

It will move you into the area between the two numbers.

Ad

Answer this question