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: Teleportation

Previous Thread :: Next Thread 
sunday1520 is not online. sunday1520
Joined: 23 Aug 2012
Total Posts: 693
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 is not online. 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
sunday1520 is not online. sunday1520
Joined: 23 Aug 2012
Total Posts: 693
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 is not online. 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
sunday1520 is not online. sunday1520
Joined: 23 Aug 2012
Total Posts: 693
21 Aug 2013 08:01 PM
No sorry, i want to teleport just the player who touched the brick.
Report Abuse
cntkillme is not online. 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
sunday1520 is not online. sunday1520
Joined: 23 Aug 2012
Total Posts: 693
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
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