My ray Don't work

Hi my names is Pixeluted and i want do ray but i got error I new in doing ray
Code

local Ray1 = Ray.new(workspace.Part.Position,Vector3.new(0,30,0))

while wait(0.1) do

local hit = game.Workspace:FindPartOnRayWithIgnoreList(Ray1,{workspace.Part})

if hit then

print("ok")

end

end

Error:
Screenshot_2
Thank for read

2 Likes

Isn’t it meant to be like:
Ray.new(workspace.Part.CFrame.p,Vector3.new(0,30,0))

3 Likes

Thank its work and have good day

1 Like