Raycast gun laser beam is too short

Hi I am using a raycast gun which casts from Origin (tool handle) to Mouse Position (Mouse.Hit.P).
I will use a Part for the bullet effect. Just one neon part that goes from origin to mouse position. I cannot make the size of the part exceed 2048 studs. The part might be visible to shooter but too short to reach the player that is far away. (Dont ask me why people are shooting at long distances.) How do I make it so the part is long enough or visualize the bullet. I am thinking of placing a part near anyone that is near the ray like Ray closest point to player with local scripts but how do I do that.

EDIT: I know ray length limit is 5000 studs. I am using the new ray not deprecated one.

You cannot go past the size limit of a Part. One solution would be to use multiple parts. This will allow you to get much further than 2048 studs.

1 Like

You could instead use a Beam, all you’d need to do is have an attachment from where they shot, and where the bullet hit, then set the attachments of the Beam to the ones you made. You can also customize beams using images and other effects.

1 Like