oplmn1
|
  |
| Joined: 25 Nov 2010 |
| Total Posts: 994 |
|
|
| 24 Feb 2014 05:29 PM |
I was on the wiki, copied this, read the arcital, and I don't get it.. Explain this to me please.
local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300) local hit, position = game.Workspace:FindPartOnRay(ray, user) local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") |
|
|
| Report Abuse |
|
|
oplmn1
|
  |
| Joined: 25 Nov 2010 |
| Total Posts: 994 |
|
| |
|
200AB
|
  |
| Joined: 24 Aug 2010 |
| Total Posts: 1604 |
|
|
| 24 Feb 2014 05:34 PM |
| Did you seriously just bump a thread that was not even half way down the first page? |
|
|
| Report Abuse |
|
|
oplmn1
|
  |
| Joined: 25 Nov 2010 |
| Total Posts: 994 |
|
| |
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
| |
|
oplmn1
|
  |
| Joined: 25 Nov 2010 |
| Total Posts: 994 |
|
| |
|
jewelycat
|
  |
| Joined: 10 Sep 2008 |
| Total Posts: 17345 |
|
|
| 24 Feb 2014 05:38 PM |
Have u tried
staying in SH? |
|
|
| Report Abuse |
|
|
oplmn1
|
  |
| Joined: 25 Nov 2010 |
| Total Posts: 994 |
|
| |
|
oseday
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 1308 |
|
|
| 25 Feb 2014 05:50 AM |
| You send a ray from start to the point it should look for how many studs you want it to go. And then you can check for the first part that the ray hit. Pretty easy. |
|
|
| Report Abuse |
|
|
|
| 25 Feb 2014 10:22 AM |
local startVector3 = tool.Handle.CFrame.p local directionVector3 = (mouse.Hit.p - tool.Handle.CFrame.p).unit local distance = 300 local partsForRayToIgnore = {workspace.Part, workspace.BasePlate}
local ray = Ray.new(startVector3, directionVector3 * distance)
local hit, position = game.Workspace:FindPartOnRay(ray, partsForRayToIgnore)
|
|
|
| Report Abuse |
|
|
oplmn1
|
  |
| Joined: 25 Nov 2010 |
| Total Posts: 994 |
|
| |
|