Advertisement
Guest User

Untitled

a guest
May 26th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. game:GetService("RunService").RenderStepped:Connect(function()
  2. local part, intersectionPoint, surfaceNormal = workspace:FindPartOnRayWithIgnoreList(
  3. Ray.new(character.HumanoidRootPart.Position, character.Humanoid.MoveDirection * 50),
  4. { character }
  5. )
  6.  
  7. local upVector = surfaceNormal:Cross(character.HumanoidRootPart.CFrame.rightVector)
  8. local upVector2 = surfaceNormal:Cross(upVector)
  9.  
  10. bodyForce.Force = hrp.CFrame:vectorToWorldSpace(surfaceNormal) * 9.81 * characterMass
  11. --bodyGyro.CFrame = CFrame.new(Vector3.new(), part.CFrame.lookVector)
  12. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement