beam.CFrame = CFrame.new(tool.Handle.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
I have try to test this code out w/o this part: * CFrame.new(0, 0, -distance / 2), and length of the beam does not reach the mouse.hit.position and instead goes halfway. Can someone explain this part for me ( * CFrame.new(0, 0, -distance / 2) )?
[http://wiki.roblox.com/index.php?title=Making_a_ray-casting_laser_gun]