Advertisement
Bloxxyl

Create A Character RIG script

Nov 24th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. local Body = {
  2. ["Neck"] = {
  3. C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  4. C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  5. },
  6. ["RootJoint"] = {
  7. C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  8. C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0),
  9. },
  10. ["Right Shoulder"] = {
  11. C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
  12. C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
  13. },
  14. ["Left Shoulder"] = {
  15. C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
  16. C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
  17. },
  18. ["Right Hip"] = {
  19. C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
  20. C1 = CFrame.new(.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0),
  21. },
  22. ["Left Hip"] = {
  23. C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),
  24. C1 = CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0),
  25. },
  26. }
  27.  
  28. function newCharacter()
  29. local Character = Instance.new("Model")
  30. local Humanoid = Instance.new("Humanoid",Character)
  31. local Limb = Instance.new("Part")
  32. Limb.TopSurface = "Studs"
  33. Limb.BottomSurface = "Inlet"
  34. Limb.Size = Vector3.new(1,2,1)
  35. Limb.Anchored = false
  36. Limb.Locked = true
  37. local Torso = Limb:Clone()
  38. Torso.Name = "Torso"
  39. Torso.Size = Vector3.new(2,2,1)
  40. Torso.LeftSurface = "Weld"
  41. Torso.RightSurface = "Weld"
  42. Torso.Parent = Character
  43.  
  44. local HRJ = Limb:Clone()
  45. HRJ.Name = "HumanoidRootJoint"
  46. HRJ.Transparency = 1
  47. HRJ.Size = Vector3.new(2,2,1)
  48. HRJ.Parent = Character
  49.  
  50. local Head = Limb:Clone()
  51. Head.Name = "Head"
  52. Head.Size = Vector3.new(2,1,1)
  53. Head.BottomSurface = "Inlet"
  54. Head.Parent = Character
  55.  
  56. local Head_Mesh = Instance.new("SpecialMesh")
  57. Head_Mesh.MeshType = "Head"
  58. Head_Mesh.Scale = Vector3.new(1.25,1.25,1.25)
  59. Head_Mesh.Parent = Head
  60.  
  61. local Head_Face = Instance.new("Decal")
  62. Head_Face.Name = "face"
  63. Head_Face.Face = "Front"
  64. Head_Face.Texture = "rbxasset://textures/face.png"
  65. Head_Face.Parent = Head
  66.  
  67. local Right_Arm = Limb:Clone()
  68. Right_Arm.Name = "Right Arm"
  69. Right_Arm.Parent = Character
  70.  
  71. local Right_Leg = Limb:Clone()
  72. Right_Leg.Name = "Right Leg"
  73. Right_Leg.Parent = Character
  74.  
  75. local Left_Arm = Limb:Clone()
  76. Left_Arm.Name = "Left Arm"
  77. Left_Arm.Parent = Character
  78.  
  79. local Left_Leg = Limb:Clone()
  80. Left_Leg.Name = "Left Leg"
  81. Left_Leg.Parent = Character
  82.  
  83. local Neck = Instance.new("Motor6D")
  84. Neck.Part0 = Torso
  85. Neck.Part1 = Head
  86. Neck.C0 = Body.Neck.C0
  87. Neck.C1 = Body.Neck.C1
  88. Neck.Parent = Torso
  89.  
  90. local RootJoint = Instance.new("Motor6D")
  91. RootJoint.Part0 = HRJ
  92. RootJoint.Part1 = Torso
  93. RootJoint.C0 = Body.RootJoint.C0
  94. RootJoint.C1 = Body.RootJoint.C1
  95. RootJoint.Parent = HRJ
  96.  
  97. local Right_Shoulder = Instance.new("Motor6D")
  98. Right_Shoulder.Part0 = Torso
  99. Right_Shoulder.Part1 = Right_Arm
  100. Right_Shoulder.C0 = Body["Right Shoulder"].C0
  101. Right_Shoulder.C1 = Body["Right Shoulder"].C1
  102. Right_Shoulder.Parent = Torso
  103.  
  104. local Left_Shoulder = Instance.new("Motor6D")
  105. Left_Shoulder.Part0 = Torso
  106. Left_Shoulder.Part1 = Left_Arm
  107. Left_Shoulder.C0 = Body["Left Shoulder"].C0
  108. Left_Shoulder.C1 = Body["Left Shoulder"].C1
  109. Left_Shoulder.Parent = Torso
  110.  
  111. local Right_Hip = Instance.new("Motor6D")
  112. Right_Hip.Part0 = Torso
  113. Right_Hip.Part1 = Right_Leg
  114. Right_Hip.C0 = Body["Right Hip"].C0
  115. Right_Hip.C1 = Body["Right Hip"].C1
  116. Right_Hip.Parent = Torso
  117.  
  118. local Left_Hip = Instance.new("Motor6D")
  119. Left_Hip.Part0 = Torso
  120. Left_Hip.Part1 = Left_Leg
  121. Left_Hip.C0 = Body["Left Hip"].C0
  122. Left_Hip.C1 = Body["Left Hip"].C1
  123. Left_Hip.Parent = Torso
  124.  
  125. return Character
  126. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement