how to aim or target like gta (the green arrow when you press right click)

hi i am making a game and a i want to provide a feature to right click aim like gta does but i don’t know how to make it please help i look every where for it and didn’t find the answer i even don’t know i its hard or easy to do it or not so please help
i dont have much to talk about for the scripting option