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

How do you make a teleport GUI? [closed]

Asked by 10 years ago

I'm trying to make it so you can teleport to other games but I don't know how to do it. I need to do this to group the good with bad.

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
-1
Answered by 10 years ago
s = game:service("TeleportService")
id = "ID Goes Here (numbers at end of address bar of a game)"

function onClicked()
s:Teleport(id)
end

script.Parent.MouseButton1Click:connect(onClicked)

put it in a local script in an image button! :D

Ad
Log in to vote
0
Answered by 10 years ago

@Above I think he meant teleporting players around the map, with CFrame and Vector3.

Here's how you would make a player teleport to a spawn or something, through GUI, do this:

torso = script.Parent.Character.Torso -- Do script.Parent until you get to the StarterGui folders parent

function clickked(GUI)
torso.CFrame = CFrame.new(Vector3.new(Go to the block you want them to tp to, and copy the position))
end

script.Parent.MouseButton1Down:connect(clickked) --I'm assuming the script is inside the TextButton.