Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I make a teleport gui teleport my whole character instead of my lower torso?

local player = game.Players.LocalPlayer
local character = player.Character
script.Parent.MouseButton1Click:Connect(function()
	character.LowerTorso.Position = Vector3.new(-51.185, 6.295, 17.411)
end)

it separates my lower torso from my character and it goes flying and i can't move.

3 answers

Try teleporting the HumanoidRootPart instead.

2 comments

0

i did it does the same thing

0

can you try character:MoveTo(Vector3.new(-51.185, 6.295, 17.411))?

Hello! Hope you're having a great day :D

I see you're struggling to move the player's position, and I'd personally recommend you use CFrame this is a very powerful property as it stores everything about a part, position, rotation, size, etc.

Also to move the player you'd want to teleport it by it's primary part which is usually HumanoidRootPart

So in your script, this is how we would implement it:

First, you will want to put a part where you want the player to teleport. Then in the console at the bottom of your studio input the below command: print(game.Workspace["YOUR PART HERE"].CFrame.Position)

The output will look like so:

100, -50 ,100

Now that we have that we can do this:

local player = game.Players.LocalPlayer
local character = player.Character
local tpCFrame = CFrame.new(100, -50, 100) -- our location

script.Parent.MouseButton1Click:Connect(function()
    character.HumanoidRootPart.CFrame = tpCFrame -- changed the part to the rootpart, and used cframe instead of vector3
end)

I hope I was able to help you today :D

Thanks for reading,

  • DrShockz

When teleporting, you need to reference the HumanoidRootPart, rather than the LowerTorso.

It's also necessary to do this activity in a Server Script.

script.Parent.Touched:Connect(function(touched)
	if touched.Parent:FindFirstChild('Humanoid') then
		touched.Parent:MoveTo(Vector3.new(-10.5, 6, 16))
	end
end)

6 comments

0

that makes it walk

1

no it doesnt. your talking about humanoid:moveto(). its two different methods. get it right smh

0

sabrna no it doesnt

0

thanks for the 2 unnecessary downvotes

0

3 :D

1

Don't fasely downvote when this is a valid answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.