I’ve been thinking of how I can show hitscan gun bullets in a more subtle, but aesthetically pleasing way.
The classic way of doing this, of course, is creating a part and making it into a laser beam when the ray is cast. The problem with this is it doesn’t look quality. My question is, what are your methods of showing raycast bullets? Id love to hear about any methods you like to use.
Something like the bullet tracers in CSGO is an example of the type of effect I’m looking for, something to give the player (and other players) an idea of where the cast is.

1 Like
You can probably use a scrolling beam.
Make two attachments: one at the muzzle, the other at the point of contact.
Make a Beam and attach it to the two attachments.
Set Segments to 1. It’s a straight line anyway.
Set a Texture. I used rbxasset://textures/ArrowFarCursor.png
to test.
Set TextureMode to Stretch and TextureLength to less than 1; or to Wrap and the TextureLength to more than the length of the tracer.
Set TextureSpeed to something that looks good. Since your shots are hitscan, the hit will have landed a while ago by the time the tracer visually reaches the target; the tracer is just there to look good. If the tracer is short (the distance between muzzle and hit is short), then make the tracer faster; if the tracer’s length is medium, make it slow; if the tracer is long, then don’t make it too slow or the time between the target getting hit and the tracer hitting seems too long/laggy.
The hard part is now deleting the tracer trail before it loops and shows a second tracer; you’ll probably need to time it with RenderStepped, or add a lot of leniency with TextureLength.
The key part that can make or break this, is whether Trails start out at their origin when they are created, that they start at the muzzle instead of appearing from any point between muzzle and hit point. I’m not 100% on this, that’s why I’m saying it, but cloning my testing trail shows they can operate independently, according to the time they are created.
12 Likes