TeHArGiS10

Untitled

Sep 3rd, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var HoldMe: Transform;
  2. var HoldMe2 : Transform;
  3.  
  4. if(HoldPistol) {
  5. if(Physics.Raycast(transform.position, transform.forward, hit)) {
  6. if(Input.GetMouseButtonDown(0))
  7. hit.transform.parent = HoldMe.transform;
  8. if(Input.GetMouseButtonUp(0))
  9. HoldMe.transform.parent = null;
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment