Mann56 Posted July 3, 2016 Share Posted July 3, 2016 Hey guys, I am making a script which teleports a guy away from area 51 to random cords but when i used processLineOfSight to detect whether the land is aboveor below the player ( after the teleport , since i didnt change the z cord on teleport) but it just doesn't detect the hit. I want it to detect a world model but it doesn't detect leaving my player either below the world object or far above it after teleport. Can someone help me to detect world objects using processLineOfSight? function detectProperPos(thePlayer) local x,y,z = getElementPosition(thePlayer) local hit,hitX,hitY,hitZ = processLineOfSight(x,y,z,x,y,z + 300,true,true,true,true,true,false,false,false,thePlayer,true) if hit then setElementPosition(thePlayer,hitX,hitY,hitZ) setElementFrozen(thePlayer,false) else local shit,hitX,hitY,hitZ = processLineOfSight(x,y,z,x,y,z - 300,true,true,true,true,true,false,false,false,thePlayer,true) if shit then setElementPosition(thePlayer,hitX,hitY,hitZ) setElementFrozen(thePlayer,false) outputChatBox(hit) else outputChatBox("Fail") end end end Thanks, Mann Link to comment
Mann56 Posted July 3, 2016 Author Share Posted July 3, 2016 Nvm the error is fixed now . Thanks for reading. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now