Guest User

convert WedgeParts to wedge meshes

a guest
Oct 17th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. --RUN THIS IN MODERN ROBLOX STUDIO
  2.  
  3. for _, old in pairs(workspace:GetDescendants()) do
  4.     if old:IsA("WedgePart") then
  5.         part = Instance.new("Part")
  6.         mesh = Instance.new("SpecialMesh")
  7.        
  8.         mesh.MeshType = Enum.MeshType.Wedge
  9.         mesh.Parent = part
  10.        
  11.         part.BrickColor = old.BrickColor
  12.         part.Material = old.Material
  13.         part.Reflectance = old.Reflectance
  14.         part.Transparency = old.Transparency
  15.         part.Size = old.Size
  16.        
  17.         if old.Anchored == true then
  18.             part.Anchored = true
  19.         end
  20.         if old.CanCollide == false then
  21.             part.CanCollide = false
  22.         end
  23.         if old.Locked == true then
  24.             part.Locked = true
  25.         end
  26.        
  27.         part.BackSurface = old.BackSurface
  28.         part.BottomSurface = old.BottomSurface
  29.         part.FrontSurface = old.FrontSurface
  30.         part.LeftSurface = old.LeftSurface
  31.         part.RightSurface = old.RightSurface
  32.         part.TopSurface = old.TopSurface
  33.        
  34.         part.Name = old.Name
  35.         part.Parent = old.Parent
  36.         part.CFrame = old.CFrame
  37.        
  38.         print("replaced", part.Name)
  39.         old:Destroy()
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment