Why does my shoot trace weapon not work?

I have made a weapon which uses shoot trace instead of projectile. The problem is it gives this result:-

I used this blueprint code

Please help!

You are multiplying your location by 18.000. Not your direction. The direction is a normalized vector with the size of 1 unit and represents the path the trace should take. You only add the result of that multiplication with your location.

Also the more commonly used approach here unless you need to be able to click on locations on the screen is to use your camera to get those values.

“Reference to camera” → “Get World Location” → Trace Start

“Reference to camera” → “Get Forward Vector” multiply by your number (e.g. 18.000) and add your world location → Trace End.

Since your camera is where you’re looking at it will always be the exact middle of the screen.

Cheers

Nice! It worked like a charm!
Thank you!

The place where the trace is hit does not show the particles which I want. How can I fix this?(Look in the Spawn Emitter Node)

Because you only spawn an emitter when you didn’t hit anything.

(Return value of a trace means: Did the trace hit anything?)