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 |
|
|
|
| 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
|
  |
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 16 Apr 2014 06:57 PM |
| Do you even read the question??? |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|