This script is inside a part. When you touch it, it will bring you to those cords in the script. But it takes everyone in the game w/ you to the part at the cords.
function lol() local player = game.Players:GetPlayers() for i = 1, #player do player[i].Character:MoveTo(Vector3.new(12.4, 10.649, -209.491)) --Change the cords to what you want to teleport to! "(12.12.12))" end end script.Parent.Touched:connect(lol)
If you could help me, THANK YOU VERY MUCH!
function onTouch(hit) local human = hit.Parent:FindFirstChild("Humanoid") local player = game.Players:GetPlayerFromCharacter(human.Parent) if human then player.Character:MoveTo(Vector3.new(12.4, 10.649, -209.491)) end end script.Parent.Touched:connect(onTouch)
--you can even cut some of the code since you could just move the humanoid parent...
I have Never used the MoveTo Method I use CFrame.
script.Parent.Touched:connect(function(hit) if hit.Parent then local hum = hit.Parent:findFirstChild("Humanoid") if hum then local torso = hit.Parent:findFirstChild("Torso") if torso then torso.CFrame = CFrame.new(12.4, 10.649, -209.491) end end end end)
This is tested and works.