of     1   

BobCowMan
#182987599Thursday, February 04, 2016 4:18 PM GMT

My code welds a torso to the wall on touch When a player presses 'W', the camera's lookVector and the torso's lookVector are used so the player can move along the wall so it looks like they are running on the wall. Here's a snippet of the code- if keys["w"] and character.welded1.Value == true then torso.CFrame = CFrame.new(torso.Position,torso.Position+Vector3.new(cam.CoordinateFrame.lookVector.X,cam.CoordinateFrame.lookVector.Y,0)) torso.CFrame = CFrame.new(Vector3.new(torso.Position.X+1*torso.CFrame.lookVector.X,torso.Position.Y+1*torso.CFrame.lookVector.Y,torso.Position.Z),torso.Position+Vector3.new(cam.CoordinateFrame.lookVector.X,cam.CoordinateFrame.lookVector.Y,0))*CFrame.Angles(0,math.pi,math.pi/2) print(cam.CoordinateFrame.lookVector) end --Here is the problem- The game will randomly break at some point when the player is moving on the wall. At that instance, the printed lookVector looks something like this- -0.961045027, 0.276391804, -7.62939365e-008 I believe -7.62939365e-008 is the number in question. It seems whenever one of the lookVector's coordinates are 0 or close to 0, such as this one, the game breaks. Why is this?
BobCowMan
#182988148Thursday, February 04, 2016 4:38 PM GMT

Just happened again printed lookVector when it breaks: -0.94407618, 0.329727083, 8.01086344e-007
BobCowMan
#182988199Thursday, February 04, 2016 4:39 PM GMT

again: -0.941175997, 0.337916732, -3.94674635e-006 Just to show it is pretty consistent
BobCowMan
#182989938Thursday, February 04, 2016 5:38 PM GMT

Bump
BobCowMan
#182999224Thursday, February 04, 2016 9:21 PM GMT

^
BobCowMan
#183011078Friday, February 05, 2016 12:30 AM GMT

bump

    of     1