Then it would create a beam going 100 studs forward from the direction and position of cf. I have tried to make this, but I got stuck a lot, any help would be much appreciated!
function beamFromPosition(cf, distance)
--create the beam part
Beam.CFrame = cf:ToWorldSpace(CFrame.new(0,0,-distance))
Beam.Size = Vector3.new(width, height,distance/2)
end
Oh, ok. That is easy, just create a new anchored part and 2 attachments in it(I will call them startBeam and endBeam) set the part’s CFrame to the desired CFrame and makes the endBeam have a position of (0,0,-distance)