Scripting an interaction system

Hey there!
I’ve been trying for the last 6 months or so to script an interaction system similar to the one below with no success. Ideally it would:

  • Automatically detect an interaction and target it within 10 studs (or whatever magnitude I set)
  • Targeted interaction should be able to be changed based upon position of mouse on screen when within the given magnitude
  • Detect what face is being targeted with the mouse, or what face is facing the player

I was also wondering whether this should be done entirely in a local script or a module script called locally, or what.
Here is an example video. Thanks!
Streamable Link

1 Like

You obviously already know how to check magnitude so I’ll skip that…

You’d then wanna RayCast from the mouse’s position in the 3D world and find out what surface it is hitting (and if it’s a door).

If it’s a door, you can then display the billboardGui (or what you’re displaying).

I’m not sure if this is exactly what you want, I can modify it to how you like though :+1:

2 Likes

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