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 » Game Design
Home Search
 

Re: teleport a player with a local script?

Previous Thread :: Next Thread 
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
15 Apr 2016 12:15 AM
Is there a way to teleport a local player with a local script? If not how would I get the local script to teleport the player and then finish itself without glitching?


Report Abuse
cjcool12345 is not online. cjcool12345
Joined: 28 Jan 2010
Total Posts: 606
15 Apr 2016 04:02 AM
It's actually fairly simple. All you need to do is change the CFrame of a part located in the character named HumanoidRootPart, or if your worried about collisions, use the MoveTo method on the character.

You can get the player from the LocalPlayer property which can be found in the Players service. You can use this in an if statement to check if the player has a character, if the player has a character, use the MoveTo method on it with your desired Vector3 destination.

I'm not sure why you would want a single script just to teleport a player. What is your use-case for it? Also I have no idea what you mean by "finish it."
Report Abuse
spinywind is online. spinywind
Joined: 26 Jan 2012
Total Posts: 3580
15 Apr 2016 04:23 AM
local Player = game.Players.LocalPlayer

-- function/event

Player.Torso.Position.CFrame = CFrame.new(Vector3.new(x,y,z) -- Change your positions to where you want your player to teleport.



#Code for i,v in pairs do (game.Players:GetChildren()) v:Kick('Your a noob!') end
Report Abuse
CyborgDonut is not online. CyborgDonut
Joined: 06 Aug 2013
Total Posts: 733
15 Apr 2016 12:02 PM
I actually got it to work. Thanks for the help though!

This is what I did if you are curious.

player = game.Players.LocalPlayer
Torso = player.Character.Torso
Torso.CFrame = CFrame.new(Vector3.new(-142.421, 133.679, -107.236))


Report Abuse
WoolHat is not online. WoolHat
Joined: 19 May 2013
Total Posts: 1873
15 Apr 2016 01:32 PM
I'm not sure if that will work how you want it to in test mode or an online server
Report Abuse
math123456789azq is not online. math123456789azq
Joined: 30 Dec 2013
Total Posts: 1
22 Jan 2017 03:22 PM

An administrator banned me because I was camping in a tree, I did not see any regulations that said it was forbidden.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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