so I really like the guns in the roblox game “Isle” and was wondering how I’m meant to approach this script in order to create something similar. I thought about using ClickDetector since the guns work by hovering your mouse over your target, clicking them and then an animation plays where you fire the gun. However, I feel like that wouldn’t work since the guns also detect if you unequip them or the target hides behind an obstacle.
Have you utilized Raycast in the code? If not, then I’m sure it’ll be useful to use it for obstacle-checking and see if there’s any blockages and make the message “You miss the shot” when an obstacle is detected.
Not sure if I’m misunderstanding, but I think you could just remove any found ClickDetector inside the target when it is unequipped.
Off-topic, but Isle NPCs are fun to mess around with due to their stupidity.