Buzzy

Loading...

Buzzy

Register

Roblox Studio Tutorials - October 6, 2021

How to Teleport to a Part by Pressing “E”

1

Buzzy Beth

@buzzygamesbeth

Download – Teleport Script

How To – Teleport to a Part by Pressing “E”

What’s up everyone welcome to buzzygames, my name is BuzzyGamesBeth and today I’ll be teaching you how to teleport to a part by pressing “E”!

  • We want to teleport into this arena by pressing “E” at the brown door.
  • So first thing we want to do is grab a part and this part is going to be the part that we want to teleport to. So go ahead and resize that to however you would like. Inside of our properties inside of our part go ahead and untick can collide and then i’m gonna change the transparency to one because I don’twant to see it.
  • I’m gonna rename this part to “teleport” so we’ll be referencing that part’s name inside of our script in just a second.
  • So inside of our door or the part that you want to interact, i’m going to go ahead and add a proximity prompt inside of our door part and then
  • Inside of the proximity prompt, the properties you can change the action text to however you would like, i’m going to say “teleport to arena”. So the action text is anytime you’re near the the door it’ll pop up and say teleport to arena press “E”.
  • You can change the hold duration, you can change the key number, key code!
  • The hold duration is how long you have to hold the key code for the action to occur.
  • So inside of our proximity prompt, we’re going to add a script and let’s go ahead and delete our print statement. So inside of our script we’re going to go ahead and create a function where anytime a player presses “E”, then we’re going to teleport to our part which is the “teleport” part.
  • You’ll see how I reference that inside of this script-so go ahead and hop into your game and let’s go ahead and walk to our door and you’ll see that the action text “teleport to arena” you just gotta press “E” and then i’m gonna press “E” and look at that, I teleport to the arena!