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

How do I teleport to another place with a textbutton?

Asked by 6 years ago

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

0
This is not a request site. Make your own attempt at this then when you get a problem, post here. awfulszn 394 — 6y
0
I tried it with two scripts FrikiGameplaysHD 1 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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.

0
BTW The script only teleports you to one place. I think you can figure out for the person to go back. TheLightningRises 56 — 6y
0
Ok i'll try FrikiGameplaysHD 1 — 6y
0
It says me there is an error in telebutton FrikiGameplaysHD 1 — 6y
0
K wait few minutes ill make something up for you. TheLightningRises 56 — 6y
View all comments (2 more)
0
Ok FrikiGameplaysHD 1 — 6y
0
How is it going? FrikiGameplaysHD 1 — 6y
Ad

Answer this question