Make a ClickDetector be activated with a keyboard key

Hello! I want to make it so a ClickDetector can be activated with a click or with a key. (kinda like Doors & Rooms.)

Here is an example (pay attention to the overlays):

Is there any way I can replicate this?

1 Like

See: Adding Proximity Prompts | Documentation - Roblox Creator Hub

Proximity prompts can be clicked (this is mostly for mobile support, but PC users can use it too) and naturally can hold down a key to trigger it (duration can be customised).

1 Like

I’m using a custom gui, and it doesn’t work when I click it sadly.

Enable this property:

If you want custom UI uhhh give me a second and I’ll see if it can do that…

Also:

For customised prompts

Oh I don’t mean that type of custom gui, I mean like something comes up in a ScreenGUI, like a TextLabel or something like that.

You can use the functionality of a proximity prompt but keep it hidden:

and then use your own GUI overlay

I found a solution using ProximityPromot:InputHoldBegin() and UserInputService.InputBegan. Thank you for helping me though, any reply is appreciated from me.

if your using a surface gui, use the adornee to the part it should show up so that the button will be clickable.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.