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: Moving a player to another player's position?

Previous Thread :: Next Thread 
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
20 Jul 2014 06:25 PM
I have this relatively simple script:

script.Parent.MouseButton1Down:connect(function()
if script.Parent.Text ~= "" then script.Parent.Parent.Parent.Parent.Parent.Character:MoveTo(Vector3.new(game.Workspace[script.Parent.Text].Torso.Position))
script.Parent.Parent.Parent.Parent.Parent.Character["Player Teleport"]:remove()
script.Parent.Parent.Visible = false
end
end)

This basically checks which name in the Gui I clicked on (In this case it was my own) and it's supposed to move the player to the other player. However it teleports me to the middle of the map under the map and I fall to my death.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 06:26 PM
script.Parent.Parent.Parent.Parent.Parent.Character

game.Players.LocalPlayer.Character
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
20 Jul 2014 06:27 PM
Vector3.new(game.Workspace[script.Parent.Text].Torso.Position)

Position is a Vector3, and Vector3.new(Vector3) does not throw an error, but creates a Vector3 value with value 0, 0, 0.

game.Workspace[script.Parent.Text].Torso.Position
Report Abuse
rudolph101 is not online. rudolph101
Joined: 15 Jan 2009
Total Posts: 11873
20 Jul 2014 06:29 PM
Thank you! It works! :D
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