|
| 26 Mar 2014 08:53 PM |
function moveRight(part) local ray = Ray.new( Vector3.new(part.CFrame.p), Vector3.new(part.CFrame.p + Vector3.new(0,0,1)) ) local ignore = script.Parent hit = Workspace:FindPartOnRay(ray) if hit.Name == part.Name then --THIS LINE IS BROKEN match(part, hit) end if ray == nil then for i = 1, 20 do part.CFrame = part,CFrame + Vector3.new(0, 0, 0.2) end end end
Error: Trying to index global hit(nil value)
|
|
|
| Report Abuse |
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 26 Mar 2014 08:54 PM |
part,CFrame + Vector3.new(0, 0, 0.2)
part.CFrame* |
|
|
| Report Abuse |
|
A8U
|
  |
| Joined: 25 Mar 2014 |
| Total Posts: 63 |
|
|
| 26 Mar 2014 08:55 PM |
Hit is nil... if hit and hit.Name == part.Name then |
|
|
| Report Abuse |
|
| |