Proximity Based Lock-On System

i used ProximityPromptService to make a target-lock system so you can lock onto enemies that are within a certain range of your character

to help show how it worked i made my head turn red every time i pressed the targetting button lol

I put proximity prompts in every targetable enemy with the style set to custom to make them invisible, then i used the PromptShown and PromptHidden events to add/remove enemies in a table which i then loop through to find the closest one

another really useful feature is the RequiresLineOfSight property of ProximityPrompts so that enemies can only be targeted if they are in the camera view

this was the best system i found for proximity detecting, compared to other things i tried like raycasting and region3. hope u like it :slight_smile:

10 Likes