script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
game.ReplicatedStorage.Teleport1:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
wait(1)
game.Workspace:WaitForChild(game.Players.LocalPlayer.Name).Torso.CFrame = CFrame.new(-188.16, 39.299, -234.1)
end
end)
✓ ANSWER ACCEPTED
Script won't teleport the player, help?
1 answer
✓ Accepted answer
You need to use :MoveTo(), I'll provide an example below:
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
hit.Parent:MoveTo(Vector3.new(-188.16,39.299,-34.1))
end
end)
Typed on mobile and couldn't test so sorry for any mistakes if any.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
thank
The ~= nil isn't necessary, you can just do hit.Parent:MoveTo(vec3) and it should work.