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