generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Need help on moving all players in random positions

Previous Thread :: Next Thread 
textartotoboy2 is not online. textartotoboy2
Joined: 24 Jul 2012
Total Posts: 368
20 Nov 2015 07:45 PM
Hi, i need help on how to move all players (game.players) to a random position like:

Positions = {Vector3.new(2853.855, 58.934, -230.27) , Vector3.new(9845.25,345.435,-23433)}

for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(Vector3.new(math.random(#Positions))) ALL players!")
end

Is this correct? Because everytime i test this it teleports me but not in the position given. (I get teleported somewhere else and i fall and die.)

thanks, text
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
20 Nov 2015 07:49 PM
Positions = {Vector3.new(2853.855, 58.934, -230.27) , Vector3.new(9845.25,345.435,-23433)}

for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(math.random(#Positions))
end
Report Abuse
DrHaximus is not online. DrHaximus
Joined: 22 Nov 2011
Total Posts: 8410
20 Nov 2015 07:50 PM
Positions = {Vector3.new(2853.855, 58.934, -230.27) , Vector3.new(9845.25,345.435,-23433)}

for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(Positions[math.random(#Positions)])
end

-- fixed it for you, friend above me
Report Abuse
textartotoboy2 is not online. textartotoboy2
Joined: 24 Jul 2012
Total Posts: 368
20 Nov 2015 08:54 PM
Oops, forget the "ALL Players!" Without that it still does not work.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image