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

How would you script a gui teleport?

Asked by
JJ_B 250 Moderation Voter
9 years ago

I am making an elevator that when you click on a TextButton in a GUI, it will teleport you to another part. I've tried salvaging scripts from teleport pads, etc, but they either teleport everyone or just don't work. Can someone please help?

1
Where is your attempt? M39a9am3R 3210 — 9y

2 answers

Log in to vote
0
Answered by
yoshiegg6 176
9 years ago

Well, first you would make a local script in the text button. Then put this code into it.

char = game.Players.LocalPlayer.Character
destination = game.Workspace.ANYBRICKYOUWANTHERE

function teleporter()
char.Torso.Position = destination.Position + Vector3.new(0,5,0)
script.Parent.MouseButton1Click:connect(teleporter)
0
Where's the end to your function? M39a9am3R 3210 — 9y
0
I edited it a bit (changed Position to CFrame and added 'end') and finally got it working! Thanks for being helpful unlike SOME *cough yumtaste cough* JJ_B 250 — 9y
1
You know, you benefited little to none at all from him supplying you with the script. This site, is in no way for requesting scripts. You claim that you have made an attempt yet showed no evidence. M39a9am3R 3210 — 9y
0
It's not a police interview, I understand what I should have done from this script and know for the future. Go and pull that rod out of your arse. JJ_B 250 — 9y
Ad
Log in to vote
-1
Answered by
yumtaste 476 Moderation Voter
9 years ago

This is not a request site. Check the ROBLOX wiki, and if you have errors with your script, then you can repost and we will help you.

0
I made a bad teleportation system myself for it. Thanks for your help [sarcasm.] JJ_B 250 — 9y
1
Well you should've posted your code first and given us the output and the hierarchy. This IS NOT A REQUEST SITE! yumtaste 476 — 9y
0
I set a community moderation on this question, anyone with 40+ reputation can vote on it, and I also reported his suggestive comment in the answer he accepted to site staff. M39a9am3R 3210 — 9y

Answer this question