Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I teleport to another place with a textbutton?

I want to make a teleport between places button. Please help me

2 comments

0

This is not a request site. Make your own attempt at this then when you get a problem, post here.

0

I tried it with two scripts

1 answer

You would want a few things. Im assuming you know basic GUI scripting.

Local teleButton = script.parent -- the button the local script has to be in. 
Local placeOne =  -- the brick where you want them to teleport and it's position.
Local torso = game:GetService("Players").LocalPlayer.Character:FindFirstChild("Torso") -- gets the torso of the player 
Local canTele = true  

teleButton.MouseButton1Click:connect(function()
	if can tele and torso then 
		wait(0.2)
		torso.Cframe = palceOne.Cframe
end)


This script may or may not work, I made it on the spot, so try it at least.

This script must be inside a textButton or imageButton also use a local script.

6 comments

0

BTW The script only teleports you to one place. I think you can figure out for the person to go back.

0

Ok i'll try

0

It says me there is an error in telebutton

0

K wait few minutes ill make something up for you.

0

Ok

0

How is it going?

This discussion is preserved as it was. New answers, comments, and votes are closed.