|
| 21 Aug 2013 07:57 PM |
Alright, so i have a insanely long script, but most of it is just effects and cool stuff during the teleportation sequence. The whole teleporting part is here:
p = game.Players:GetChildren() for i = 1, #p do p[i].Character.Torso.CFrame = CFrame.new(Vector3.new(0, 300, 0)) wait(0.5)
*Making it clear i did not make this part of the script* I made the other 100 lines but not this. I got this part off of a youtube video. Anyways, i do understand it, just apparently not enough. But heres the problem, obviously, this grabs all players in the game, and teleports everyone to the location. WEll the problem is i dont want that. I just want a script that teleports the one person who touched it. I know i need to findFirstChild(plr.Name) but i dont know how to manipulate that into this for statement. Can anyone help me out? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Aug 2013 07:58 PM |
The Vector3 part is useless, do: CFrame.new(0, 300, )
and you are missing an end. |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2013 07:59 PM |
| Didnt work without the Vector3 before. and i didnt include the ends. Like i said this is just a small section of the script. Anyways, can u help me with the whole grabbing one player? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Aug 2013 08:00 PM |
It works without the Vector3, and what? "grabbing one player" as in a random player? If so:
local Players = Game.Players:GetPlayers() local PlayerChosen = Players[math.random(1, #Players)] |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2013 08:01 PM |
| No sorry, i want to teleport just the player who touched the brick. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 21 Aug 2013 08:03 PM |
Then that loop was useless, do:
hit.Parent:MoveTo(Vector3.new(x, y, z))
>Assuming hit is the argument you provided |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2013 08:04 PM |
| alright thanks! Like i said i got it off of a youtube vid. And yea, my parameters had hit so thanks. ill put it in |
|
|
| Report Abuse |
|
|