Hello, new to raycasting, but very confused with the end
local ray = Ray.new(script.Parent.Handle.CFrame.Position, (mouse.Hit.Position - script.Parent.Handle.CFrame.Position).unit * 300)
At the end the .unit * 300 part what does that do? First of all what does unit mean, second of all, what is * that supposed to do?

3 comments
wdym 0 to 1?
The piece of code given to the second parameter of Ray.new() is simple vector math. It first calculates a direction of size 1 unit and multiplying it to a scalar value of 300. Making the length of that ray "300" units/studs long. https://devforum.roblox.com/t/learning-vector-math/97559/3