How can I create a physical button that shows a GUI element

So I’m making a museum that is teaching about financial literacy. Different models in the museum represent different things and I want players to be able to learn more about a particular item by interacting with it to show more information.

I want the player to be able to interact with a part that shows a simple GUI element displaying info about the item in the museum. And then I want the GUI element to disappear once they walk a few paces away from the button.

I have very little gui scripting experience and I can’t find any tutorials to help me through this. Any help is appreciated!

1 Like

Is this what you want?

2 Likes

One second! Thanks so much for the reply, lemme check in with my pal real quick!

1 Like

Yeah, that’s perfect! Do you have the source code handy? Thanks so much!

1 Like

Yep, I just made a little system for it:
Buttons.rbxl (44.5 KB)

So I’ll just explain quickly on how to modify it:

  1. Let’s say you want to add a new button with some new info, you have to first add a new frame into this holder:
    image

(make sure to set the frame as not visible)

  1. Now, copy and paste the button and switch the script inside:
    image
    Like you see here, switch out “LuauInfo” with your frame’s name.

And that’s it, have fun.

2 Likes

Tysm! This will really help! :smile:

2 Likes

You could use proximity prompts. Attached is a quick baseplate example you can look at
Example.rbxl (42.6 KB)

2 Likes

Could you attach a video, just for reference? Thanks!

1 Like

No problem, if you want it to work with proximity prompts instead, I can also do that.

2 Likes