|
| 02 Feb 2012 07:48 PM |
How come the ray's angle is tilted slightly up? I know this for the the fact I place parts where the collision is.
for Angle = 90, 360, 90 do
for x = 1, 100 do if Pos == nil then wait()
local Ray = Ray.new(script.Parent.Position, CFrame.Angles(math.rad(80), 0, math.rad(Angle)) * (script.Parent.CFrame.p.unit * x)) local hit, position = game.Workspace:FindPartOnRay(Ray)
if hit then Pos = position end end end
if Pos ~= nil then local Part = Instance.new("Part") Part.Position = Pos Part.Anchored = true Part.Parent = game.Workspace end
Pos = nil end |
|
|
| Report Abuse |
|
|
| |
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 02 Feb 2012 08:00 PM |
Lul this nub does not know how to raycast, but rad is weird. I tried using it with CFrame and it does not rotate right. It did not rotate 90 degrees like I wanted it to.
[=|I rate myself 6.5/10 in RBLX.Lua|=] |
|
|
| Report Abuse |
|
|
|
| 02 Feb 2012 08:03 PM |
I know HOW to raycast, but I can't do it well. |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 02 Feb 2012 08:12 PM |
I was talking about me, sorry for the confusion.
[=|I rate myself 6.5/10 in RBLX.Lua|=] |
|
|
| Report Abuse |
|
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 02 Feb 2012 08:13 PM |
try 89 degrees or something of that sort instead.
[=|I rate myself 6.5/10 in RBLX.Lua|=] |
|
|
| Report Abuse |
|
|
| |
|
|
| 02 Feb 2012 09:08 PM |
| Maybe I'll just use parts and .Touched. |
|
|
| Report Abuse |
|
|