#Interaction system
1 messages · Page 1 of 1 (latest)
By just using collectionService and checking the closest one to the player/ if they're close enough to interact
Also just renderStepped for the "click to interact" text obviously.
I just dont know if its good for preformance
ProximityPromptService will always be a better choice, @gritty lichen
Roblox already handles proximity, prompting, and interaction logic
This is all optimized at the engine level
I wouldn't trust him @gritty lichen 
jk
Yeah thats what i thought. But i wanna be able to interact like while holding mouse anywhere, i don't wanna use a prompt that u hold E on or something.
what could i do for that using prompts? Cause rn my approach is kinda scuffed. like when the prompt is shown, it goes to a variable like CurrentPrompt, and when they click it just gets like the parent of the currentPrompt and send to server for stuff
You'll utilize UserInputService in conjunction
Be sure to manage event connections
event connections?
Assuming you'll bind an event handler each time a prompt is shown, you must unbind the event handler once it is triggered or hidden. This will prevent duplicate event handlers and memory leaks
You could also make a lifetime connection and use a guard clause on your currentPrompt upvalue
Oh yeah, I js didn't know what u meant by event connections, thats my bad
Thanks for helping