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: How to make player teleport /around/ a point?

Previous Thread :: Next Thread 
Kinnis97 is not online. Kinnis97
Joined: 21 Feb 2010
Total Posts: 1683
16 Apr 2014 06:17 PM
I have this line that's meant to teleport every player's torso to that point, how do I make it so that the players teleport to that point, but with an offset of around 8 studs, so they don't spawn as a tower, more like a group? I've seen it before, I just can't remember how it's done. I believe I remember a * or ~ symbol somewhere.

v.Character.Torso.CFrame = CFrame.new(131.2, 5.5, -47.3)
Report Abuse
COOLDUDE11OO is not online. COOLDUDE11OO
Joined: 21 Aug 2011
Total Posts: 5115
16 Apr 2014 06:19 PM
v.Character.Torso.CFrame = CFrame.new(math.random(131,139), 5.5, math.random(-46,-54))
Something like this.
Report Abuse
Kinnis97 is not online. Kinnis97
Joined: 21 Feb 2010
Total Posts: 1683
16 Apr 2014 06:49 PM
I new it looked sketchy. Getting this error.

18:48:25.266 - Workspace.Delay:47: bad argument #2 to 'random' (interval is empty)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
16 Apr 2014 06:50 PM
math.random(-54,-46)
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
16 Apr 2014 06:56 PM
for i,v in pairs(game.Players:GetPlayers())do
v.Character.Torso.CFrame = CFrame.new ( )
end




Terhe u go
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
16 Apr 2014 06:57 PM
Do you even read the question???
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
16 Apr 2014 06:58 PM
Yea, now he can set the CFrame in a math.random or math.seed or even math.tick is possible if used right.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
16 Apr 2014 06:59 PM
He asked for help on that specific line of code not to teleport when they spawn...


And math.tick? Really?
Report Abuse
Kinnis97 is not online. Kinnis97
Joined: 21 Feb 2010
Total Posts: 1683
16 Apr 2014 07:01 PM
Actually, I realize now I need it to function differently. This is the new line, but it makes it even harder for me to under stand how this would be done.

RP.Character.Torso.CFrame = CFrame.new(game.Workspace.spawn.Position)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
16 Apr 2014 07:06 PM
function Coords(Location,Distance)
local X,Z = Location.x,Location.z
local T = {X,Z}
for _,n in pairs(T) do
X = math.random(X,X+Distance)
Y = math.random(Z,Z+Distance)
end
return CFrame.new(X,Location.y,Z)
end

Player.Character.Torso.CFrame = Coords(CFrame.new(??,??,??),10)
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
16 Apr 2014 07:12 PM
v.Character.Torso.CFrame = CFrame.new(131.2, 5.5, -47.3)+Vector3.new(math.random(10)-5, 0, math.random(10)-5)

btw nice game.
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