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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Teleporting Players

Previous Thread :: Next Thread 
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
30 Jul 2015 09:07 PM
When I do Play Solo, it teleports me to a random place. With more than one person, it doesn't teleport anybody.

spawns = {Map.spawn1,Map.spawn2,Map.spawn3,Map.spawn4,Map.spawn5,Map.spawn6,Map.spawn7,Map.spawn8}
for i,v in pairs(game.Players:GetPlayers()) do
local place = math.random(1,#spawns)
v.Character.Torso.CFrame = spawns[place].CFrame
v.Character.Torso.Anchored = true
wait(0.1)
end
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
30 Jul 2015 09:12 PM
b1
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
30 Jul 2015 09:15 PM
No ideas?

k
Report Abuse
EchoReaper is online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
30 Jul 2015 09:16 PM
That's just in a Script in ServerScriptService, right? There's nothing else in it? It's running before anyone joins. In play solo your player is added before scripts run, so a player exists when it runs in play solo.
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
30 Jul 2015 09:17 PM
It's a script in Workspace, with some other scripts and GUIs inside it.
Report Abuse
HamilcarMago is not online. HamilcarMago
Joined: 11 Jul 2010
Total Posts: 1094
30 Jul 2015 09:20 PM
Give this a try :

spawns ={Map.spawn1,Map.spawn2,Map.spawn3,Map.spawn4,Map.spawn5,Map.spawn6,Map.spawn7,Map.spawn8}

for i,v in pairs(game.Players:GetPlayers()) do
local place = math.random(1,#spawns)
v.Character:MoveTo(spawns[place].Position)
v.Character.Torso.Anchored = true
wait(0.1)
end
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
30 Jul 2015 09:25 PM
Trying it now.
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
30 Jul 2015 09:25 PM
WORKS! THANKS!
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