So I saw this tutorial on the wiki that showed about raycasting,so then I tried to do my own raycasting and I got a error saying:
18:21:54.179 - Workspace.Script:1: bad argument #2 to 'new' (Vector3 expected, got number)
Script:
local Ray = Ray.new(game.Workspace.Part.CFrame.lookVector.unit,--the ray will start at this part game.Workspace.Part.CFrame.lookVector.unit)--Ray will come out of the front local hit,position = Workspace:FindPartOnRay(Ray,_) print(hit.Name)--print name of thing that the ray hit
Why did I get this error and how do I fix it?
.new That's the problem. I mean what does Ray.new mean i dont get that little chunk :l