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 » Scripting Helpers
Home Search
 

Getting random players teleported

Previous Thread :: Next Thread 
toflyc is not online. toflyc
Joined: 08 Jul 2011
Total Posts: 985
07 Aug 2013 02:33 AM
I don't understand how to get random players teleported. If you can send me the script.
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
07 Aug 2013 02:45 AM
local randomplayer = game.Players[math.random(1,game.Players:GetPlayers())].Character

there, a random player
Report Abuse
toflyc is not online. toflyc
Joined: 08 Jul 2011
Total Posts: 985
07 Aug 2013 02:49 AM
Thank you.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
07 Aug 2013 02:50 AM
player = game.Players:GetPlayers()
local randomPlayer = players[math.random(1,#players)]
if randomPlayer.Character then
local randomCharacter = randomPlayer.Character
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
07 Aug 2013 02:51 AM
player = game.Players:GetPlayers()
local randomPlayer = players[math.random(1,#players)]
if randomPlayer.Character then
local randomCharacter = randomPlayer.Character
end

-- Forgot an end.
Report Abuse
DevilDefeater is not online. DevilDefeater
Joined: 08 Jul 2013
Total Posts: 756
07 Aug 2013 02:51 AM
@wishnite
At least help him out -.-
local randomplayer = game.Players[math.random(1,game.Players:GetPlayers())].Character
randomplayer:MoveTo(Vector3.new(1,1,1))
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
07 Aug 2013 02:52 AM
Both of yours are wrong.
Report Abuse
toflyc is not online. toflyc
Joined: 08 Jul 2011
Total Posts: 985
07 Aug 2013 02:57 AM
Now, how do you get it to teleport?
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
07 Aug 2013 03:01 AM
player = game.Players:GetPlayers()
local randomPlayer = players[math.random(1,#players)]
if randomPlayer.Character then
local randomCharacter = randomPlayer.Character
randomCharacter:MoveTo(Vector3.new(0,0,0))
end
Report Abuse
Voidion is not online. Voidion
Joined: 01 Aug 2011
Total Posts: 2668
07 Aug 2013 03:02 AM
randomCharacter:MoveTo(Vector3.new(0, 0, 0))
Report Abuse
toflyc is not online. toflyc
Joined: 08 Jul 2011
Total Posts: 985
07 Aug 2013 03:02 AM
Thank you all. :)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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