I need help with my attachment

I want to make the projectile move straight along a line, and at the end, if it reaches the target, it explodes. I can’t figure out what I need to do to make it fly straight, and if it meets an object on the way, it breaks.
I wanted to try linearVelocity but I don’t know how to set it to move in the direction the player is looking.

		
	local linearVelocity = Instance.new("LinearVelocity")
	linearVelocity.Parent = AttachmentClone
	linearVelocity.VectorVelocity = Vector3.new()

	AttachmentClone.Parent = plr.Character["Right Arm"]
	for i, v in pairs(AttachmentClone:GetChildren()) do
		if v:isA("ParticleEmitter") then
			v.Enabled = true
		end
	end
	
end)

Hello!

You could use raycast.