'E' GUI Interactions

Hello,
In games like Jailbreak and Northern Frontier they have this ‘E’ button system to interact with cars, trees and just about anything. I was wondering how that may be done? Perhaps something like a Billboard GUI will work? Thank you!

For Example:


image

4 Likes

Hey there, I recommend @DutchDeveloper 's YT channel.
He made a wonderful tutorial on it.

Of course, your going to have to take his video and apply it your your use case, which I’m sure isn’t to difficult.

7 Likes

Well, I can personally not script and help you out, but what I can tell you is…

In Jailbreak, Mad City, and more, they used what I believe is called “Keybinds”. Like most, use E, Jailbreak, Bloxburg etc.

But, they are Keybinds. I am not sure how to script so sorry if this doesn’t help much.

2 Likes

Oh and to addon, here is something that also might be more similar to your use case: https://www.youtube.com/watch?v=Zqa10ImXCRs

1 Like

basicly whenever the user presses E and isnt selecting any textboxes make a request towards the server with some information that the client has send, for exaple the vehicle the user wants to enter.
the server’s goal is to check if the user is within range and if the desired position isnt occupied.

3 Likes

i recommend using a KeyBind Event. or keyboard imput

1 Like

Get the magnitude between the interaction part and the character’s HumanoidRootPart.

Check if the magnitude is greater than or equal to a set number, for example, 4.

If it is, make your BillboardGui enabled (I suggest using a BillboardGui rather than a ScreenGui being constantly updated, as it will skip around and is not appealing.)

Check for a Keyboard Input while the magnitude is greater than/equal to your number, check if the KeyCode is E, etc.

If so, fire a RemoteEvent to do whatever you’d like to happen on the server, or possibly on the client, in which you wouldn’t use a RemoteEvent.

In the case you are using a RemoteEvent, make sure you add server-side security so exploiters cannot fire it from a distance.

One more thing: make sure you are setting the BillboardGui to Enabled.false when the player is out of range, otherwise it will still show up when the player walks away.

I also recommend disabling this if a player is sitting.

Hopefully this helped and good luck!

7 Likes