|
| 29 Dec 2015 01:30 AM |
this keeps printing "finding a diff spot..." because it never finds an empty spot
function findSpot() local randomPoint = Vector3.new(Player.Character.Torso.CFrame*CFrame.new(math.random(-5,5),0,math.random(-5,5))) local rayCheckVisible = Ray.new(Player.Character.Torso.CFrame.p,(randomPoint-Player.Character.Torso.CFrame.p).unit * 300) local hitSomething = workspace:FindPartOnRay(rayCheckVisible,Player.Character,false,true) local rayCheckGround = Ray.new(randomPoint,(randomPoint*Vector3.new(0,-1000,0)-randomPoint).unit * 1000) local hitGround,hitPos = workspace:FindPartOnRay(rayCheckGround,Player.Character,false,true) if hitSomething then wait() print("finding a diff spot...") findSpot() elseif not hitSomething and hitGround then print(hitPos) return Vector3.new(hitPos) end end
rip indentation
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2015 01:35 AM |
bump[1]
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2015 01:39 AM |
bump[2]
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2015 01:44 AM |
bump[3] pls
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2015 01:48 AM |
bump[4]
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2015 01:55 AM |
bump[5]
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|
|
| 29 Dec 2015 02:00 AM |
bump[6]
mom wheres the spaghetti |
|
|
| Report Abuse |
|
|