So i was thinking about how to make an system in which i can interact with an object within a certain radius of it (ontouch) and press a key on my keyboard to interact with it. However, as i am not very good at server and client communication (aka remote events and remote functions), i need a lengthy guide on how to do so.
Here are my game mechanics in which i need this system:
- to destroy crates (containing keys to open doors) and enemies.
- to speak with npcs
- to open doors
I am using filtering enabled (to prevent exploiters from hacking my game) and i need a guide to do so. I could use an individual script for every door, npc, crate or enemy but as you probably have guessed that isnt very efficient as there will be lots of those. Thank you for your time!

2 comments
You could put Items into folders and use the getChildren to get all the doors https://developer.roblox.com/api-reference/function/Instance/GetChildren
just to clarify i want the server function (ontouch) script in the crate (in the workspace to communicate with the client function (when e is pressed) and revert back to the server to destroy the crate (or do anything with it really)