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:
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!
****use this when a player touches something:****
function onTouched(hit) -- what you want to do gooes here end script.Parent.Touched:Connect(onTouched)
****NPC CHAT****
In an NPC, click on the NPC's head then add dialog, go onto the dialogs properties to change the text, then add dialog choice's to the dialog. You then add more dialog choice's to the dialog for as many times as you like