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
 

Re: The most valid teleportation script

Previous Thread :: Next Thread 
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
15 May 2014 06:56 PM
Doesn't work.


function tele()
local things = Game.Workspace.Maps.Spawns:GetChildren()
local Plyrs = Game.Players:GetChildren()
local d = 1
for x = 1, #plyrs do
if plyrs[x] ~= nil then
local location = things[d]
Plyrs[x].Character.Torso.CFrame = CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))
wait(0.2)
end
end

d = d + 1
if d > #things then
d = 1
end
tele()
end
Report Abuse
SenseiWarrior is online. SenseiWarrior
Joined: 09 Apr 2011
Total Posts: 12140
15 May 2014 06:58 PM
CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))

Vector3 inside CFrame.new? Why?

CFrame.new(location.Position.x,location.Position.y + 3,location.Position.z)
Report Abuse
robertjh12 is not online. robertjh12
Joined: 24 Feb 2008
Total Posts: 601
15 May 2014 07:25 PM
A vector3 within a CFrame is valid, but your vector3 is pointless... CFrame.new(location.Position) would work.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
15 May 2014 07:31 PM
I put this in my game script, and it worked. But I found the for i = 1 method to be a bit sloppy (in my opinion) when teleporting players, so I just used for i, v in pairs.
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