Advertisement
suremarc

Untitled

Jun 13th, 2015
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.40 KB | None | 0 0
  1. function SetCFrame(obj, center, cf)
  2.     local function recurse(o)
  3.         for _, child in next, o:GetChildren() do
  4.             recurse(child);
  5.         end
  6.         if o:IsA 'BasePart' then
  7.             o.CFrame = cf:toWorldSpace(center:toObjectSpace(o.CFrame));
  8.         end
  9.     end
  10.     recurse(obj);
  11. end
  12. --
  13. local c = script.Parent.Parent.BaseCoffee:Clone()
  14. c.Parent = Workspace
  15.  
  16. SetCFrame(c, c.Handle.CFrame, c.Handle.CFrame+Vector3.new(0,2,0));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement