while wait() do if on ~= "n" then beam.Size = Vector3.new(0,((hit.UpperTorso.Position - plr.Character.RightHand.Position).Magnitude)-1,0) local num = (hit.UpperTorso.Position - plr.Character.RightHand.Position).Magnitude local targetPosition = hit.UpperTorso.Position local pos = (plr.Character.RightHand.Position) beam.CFrame = CFrame.new(pos, targetPosition) local rotatedCFrame = CFrame.Angles(math.rad(-90), 0, 0) beam.CFrame = beam.CFrame:ToWorldSpace(rotatedCFrame) else beam:Destroy() end end
Currently, the beam meets the hand at its center. I want it to be the end of the beam touching the hand. How? I have tried many things.
Replace
beam.CFrame = CFrame.new(pos, targetPosition)
with
beam.CFrame = CFrame.new((pos + targetPosition)/2, targetPosition)