Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can some on help me fix this teleporting gui script?

Asked by 10 years ago
function click()

script.Parent.Parent.Parent.Parent.Parent.Character.Torso.CFrame=CFrame.new(Vector3.new(211.331, 5.061, -211.082))

end

script.Parent.MouseButton1Down:connect(click)

1 answer

Log in to vote
1
Answered by 10 years ago

Try this:

Also, Vector3.new has 3 arguments, so where I placed the comment, make a brick where you want to move the player to, copy the position, and paste it where it says 0,0,0.

script.Parent.MouseButton1Down:connect(function()
    game.Players.LocalPlayer.Character:MoveTo(Vector3.new(0,0,0))  -- here
end)
Ad

Answer this question