Roblox Studio Tutorials - January 13, 2022

How to Make a TeleportGUI


Buzzy Beth


Download – TeleportGUI Script

How To – Make a TeleportGUI

What’s up everyone welcome to buzzygames, my name is BuzzyGamesBeth and today I’ll be teaching you how to make a teleportGUI!

  • Essentially, there’s gonna be a screenGUI and you’ll be able to teleport anytime you click on the buttons.
  • Right now I have these three parts: so the red, blue, and yellow parts and I want to teleport to either of these parts by clicking on the screenGUI- a teleportGUI.
  • First thing we want to do is inside of starterGUI, let’s go ahead and add a screenGUI. I’m just going to go ahead and rename this screenGUI to “teleport”. It’s nothing too important but this is just for my reference so that I know what this screenGUI is.
  • Inside of my screenGUI let’s go ahead and add a frame and then configure the frame to wherever you want it to be and then let’s go ahead and change the color of it and i’m going to go ahead and add a UIcorner just so that the so I can have the rounded corners- so it’s not very sharp, just for aesthetic reasons! You don’t have to do this if you don’t want, but I personally like the UIcorners and how it looks.
  • Then we’re going to go ahead and add a text label and this is where it’s gonna say “teleport”.
  • Cool so once we’re done with that we’re gonna go ahead and add a text button for each part that we want to teleport to. We have three parts the red, blue, and yellow parts, those are three parts we’re going to go ahead and add three text buttons inside of our frame.
  • These text buttons essentially is anytime let’s say if you want to if you click red then i’ll be teleported to the red part if you click blue or you click yellow then obviously you’ll be teleported to those parts. These buttons go ahead and configure them to however you want to look, i’m just going to do something pretty simple. So i’m just going to go ahead and change the text button name to red, blue and yellow! Awesome okay so that’s done!
  • Go ahead and click our teleportGUI and then tick enabled so that you don’t see it inside of our workspace.
  • Let’s go ahead and add a folder, we can rename this to i’m going to do “teleportposition”. Essentially what we’re going to do is add transparent parts above the area that we want to teleport to. So i’m gonna have a part right above the red part and i’m gonna do the same for my blue and yellow parts. I’m gonna make sure to anchor that and then untick can collide so that anytime we teleport to it we don’t touch this part- we just kind of drop we’re gonna pass through it.
  • Oh that’s right, I forgot one thing! So for our text buttons, make sure to rename them the same as our parts. So what I mean by this is i’m going to rename my text button to red, blue, and yellow, so our “teleportposition” parts will also be red. yellow, and blue. Make sure that both of those names matches or else this won’t work.
  • Let’s go ahead and head over to replicated storage and add a remote event. I’m going to rename this to “teleport” but whatever you rename it to, make a note of that because we’ll be referencing that inside of our script in just a second.
  • Go ahead and add a localscript inside of our frame. Inside of the script what we have is for i button in pairs essentially what we’re doing here is referencing all of our text buttons and then for anytime a player presses the teleportGUI the red, blue, or yellow button then it’s going to fire the remote event.
  • Awesome so let’s go ahead and add a script inside of serverscriptservice. So what we have here is our variable and then we’re going to have a function where if the remote event is fired then our character is going to be teleported to our teleport position parts! So essentially what it means is anytime we press the red, blue, or yellow button then we’ll be teleported to the “teleportposition” parts, you know those three parts that we added inside of the “teleportposition” folder. The parts that are right above the areas that we want to teleport to.
  • So we have two pretty simple scripts and that’s it!