Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with rays?[Not fixed]

Asked by 9 years ago

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?

1 answer

Log in to vote
0
Answered by
Subbix -5
9 years ago

.new That's the problem. I mean what does Ray.new mean i dont get that little chunk :l

0
Ray.new is making the ray kevinnight45 550 — 9y
Ad

Answer this question