Why is The Bullet Tracer Take Time to Apply Velocity?

I have created bullet tracers for my gun in Roblox. They are not good, though, as the bullet tracer(s) will take time to apply velocity with the linear velocity. I also do not know how to make the tracers stop when they reach the position of the raycast.

Video of bullet tracer delay:

Code:

-- firepos is gun fire position, "Parent" is the tool, "Position"
-- is raycast position, "Debris" is workspace folder
local tracer = game.ServerStorage.Tracer:Clone()
tracer.Position = Parent.FirePos.Position
tracer.CFrame = CFrame.lookAt(Parent.FirePos.Position,Position)

tracer.Parent = workspace.Debris

Inside tracer:
image

Here’s some things you can do:

  • Set the network owner to nil and apply the velocity before parenting the tracer.
  • Create the tracer on the client.
  • Use fast cast.
  • Instead of using velocity, use tween service or lerp. S = d/t

I tried all but fastcast since Idk if it works for this, but in S = d/t what is d, t, and s?

It’s: time equals distance divided by speed. I meant t = d / s

1 Like

It worked perfectly! I am able to calculate when the tracer ends using tween.Completed, and the speed is customizable. It has no delay either.

1 Like

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