So I decided to go back and work on my SCP game and I worked on the door system first.
The door system works but the hand icon does not appear for other doors except one. You can see this in this video. ( Sorry for the lag blame my trash CPU )
( Blacked out some part of the code since they are the “proxmityprompts”. )
I looked at the Developer Hub and could not find anything.
Tried to use :GetDescendants().
I tried to put the code in one RunService but did not make any changes.
I tried to put the code in other places.
Also, tell me what does not make sense so I can explain the problem to you.
Okay well the first “problem” that I see, is that you’re using RunService events, when, from what I can tell, you could just be using a ClickDetector, and if you really want UI, .MouseHoverEnter and .MouseHoverLeave. Is there some specific reasoning behind the choice to use RenderStepped?
But here’s the thing. For ClickDetectors I have to somehow get a part to stay in the player’s view and somehow make it clickable without clicking the ClickDetector. Same with MouseHoverLeave / MouseHoverEnter I have to somehow get that to stay on the button and somehow make it able to press it without pressing the UI button.
Ohh, I get what you mean. When you get within a certain proximity of the button, you want any MouseButton1Down to activate the button. Is that correct?
Ok, so here’s an explanation of what I’d do. It’s kind of “hacky”, but it’s the easiest/most robust solution I can think of off the top of my head. Use proximity prompts, and set the proximityPromptStyle to “Custom”. Then, you can just set the KeyCode to nil. You can then use ProximityPromptService to find when an event is hidden and shown, this will allow you to grab what the prompt is, and then set the BillboardGui's Adornee to the ProximityPrompt’s parent. You can then also use something like ContextActionService, or any other method of getting a Button1Down event. From there you can do whatever you want with it. Once you get the PromptHidden event, you can just set the BillboardGui's Adornee to nil, and unbind the CAS binding (if thats what you end up doing), or whatever works for a different MouseButton1 solution.
If that’s too much, I can try to break it down further.