0

# Is this right way to make player teleport?

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent:MoveTo(script.Parent.Parent.Part.Position)
end
end)


I have seen people use HumanoidRootPart and CFrame for teleport but is there anything wrong with making player teleport this way? it seems to work tho.

1
There's nothing wrong using MoveTo with teleportation, so yes it's completely fine. SEAN_YT213 104 — 5d
0
Thanks Sabailuridze 111 — 5d

0

You can use PivotTo.

character:PivotTo(part.CFrame)

-1
Edited 5 days ago

Personally, I would use CFrame. (I haven't tested this tho)

local part = game.Workspace.Part -- Change This

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.HumanoidRootPart.CFrame = part.CFrame
end
end)