How do i make beam follow mouse cursor

i want to make my bullet (beam) follow the mouse position first position is barrel and the second position is the mouse how do i do that i need some help

1 Like

You’ll need to use UserInputService to detect when a player clicks (when to shoot), and a RemoteEvent to pass the position of the mouse to the server. On the server side, create a part at the gun’s position and facing the mouse position using the bullet part’s CFrame property. There are many ways to move the bullet including Tweening, Velocity and Body Movers and you may want to use raycasting to detect if the bullet hits something.

1 Like

Thats to difficult for me i only have scripted for 4 months

There are lots of tutorials and videos out there on gun systems, you can edit them a bit to match the video you sent

thank you i figured it out!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.