|
| 30 Dec 2015 09:56 PM |
elseif keyvals["end"] then for i, player in pairs(game.Players:GetPlayers()) do player.Character.Torso.CFrame = CFrame.new(math.random(232.3, 320.3), 196.5, math.random(185.9, 214.7)) end
Lets say I wanted to change those locations.
How do I find out the coordinates of the place that the certain brick is that I want it to send the players too? |
|
|
| Report Abuse |
|
|
| |
|
FlyNormal
|
  |
| Joined: 30 Sep 2015 |
| Total Posts: 344 |
|
|
| 30 Dec 2015 09:58 PM |
player.Character.Torso.CFrame = brick.CFrame + CFrame.new(0, 5, 0)
Will teleport the player to brick's CFrame and 5 studs above (so the player does not go inside the brick) |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2015 10:00 PM |
| So I just go grad the absolute location of the brick and it will send them there correct? And if I'm going to more than one location (I want to send them to four separate corners) I just separate the locations with commas? |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2015 10:03 PM |
I must be confused as to where I find the bricks location.
Since everytime I replace the 0's with what I think is the location it is breaking altogether |
|
|
| Report Abuse |
|
|
| |
|
| |
|
FlyNormal
|
  |
| Joined: 30 Sep 2015 |
| Total Posts: 344 |
|
|
| 30 Dec 2015 10:14 PM |
Fixed one:
player.Character.Torso.CFrame = brick.CFrame * CFrame.new(0, 5, 0)
You don't need to know the brick's actual position numbers, this act as a variable that already has the brick's position and directly uses it.
|
|
|
| Report Abuse |
|
|
|
| 30 Dec 2015 10:15 PM |
| How does it know what brick I'm talking about though? |
|
|
| Report Abuse |
|
|
| |
|