Advertisement
QuantumWarpCode

Part Functions for Roblox

Jul 19th, 2014
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. function createPart(name1,x1,y1,z1,parent1,xs,ys,zs)
  2.     --Sets the properties of part.
  3.     part = Instance.new("Part",parent1)
  4.     part.Name = name
  5.     part.FormFactor = "Custom"
  6.     part.Size = Vector3.new(xs,ys,zs)
  7.     part.Position = Vector3.new(x1,y1,z1)
  8.     part.Anchored = true
  9.     part.BottomSurface = 10
  10.     part.TopSurface = 10
  11.     part.RightSurface = 10
  12.     part.LeftSurface = 10
  13.     part.FrontSurface = 10
  14.     part.BackSurface = 10
  15. end
  16.  
  17. function adjustParts(x2,y2,z2,parent2)
  18.     --Gets the children.
  19.     local c = model2:GetChildren()
  20.     for index, child in pairs(c) do
  21.         --Adjusts by addition.
  22.         child.Position = child.Position + Vector3.new(x2,y2,z2)
  23.     end
  24. end
  25.  
  26. _G.createPart = createPart
  27. _G.adjustParts = adjustParts
  28.  
  29. _G.FunctionsStored = true
  30.  
  31. script:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement