Advertisement
CloneTrooper1019

Roblox Animation Editor Rigging Thing

Jul 19th, 2014
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.72 KB | None | 0 0
  1. -- Run this in the Command Bar, and change links/modify code to whatever your needs are.
  2.  
  3. local ROOT = "CAM_REGULAR"
  4. local links = {
  5.     {ROOT,"Left Arm"};
  6.     {ROOT,"Right Arm"};
  7.     {"Right Arm","Handle"};
  8. }
  9.  
  10. local obj = workspace["View Model"]
  11. local motors = {}
  12.  
  13. for _,v in pairs(links) do
  14.     local obj0,obj1 = obj:findFirstChild(v[1]),obj:findFirstChild(v[2])
  15.     if obj0 and obj1 then
  16.         local motor = Instance.new("Motor6D")
  17.         motor.Part0 = obj0
  18.         motor.Part1 = obj1
  19.         motor.C0 = obj0.CFrame:toObjectSpace(obj1.CFrame)
  20.         motor.Parent = obj0
  21.         obj0.Anchored = obj0.Name == ROOT
  22.         obj1.Anchored = obj1.Name == ROOT
  23.         table.insert(motors,motor)
  24.     end
  25. end
  26.  
  27. game.Selection:Set(motors)
  28. Instance.new("AnimationController",obj)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement