Part-To-Lua - A Build Converter!

About

Hello! I’ve created Part-To-Lua as a way to convert builds into Lua code.

How To Use

  1. Select some parts in the workspace
  2. Hit the “Convert” button
  3. Done!

Get Part-To-Lua

Download today!

Saves Values

  • Name
  • Position
  • Size
  • Orientation
  • Color
  • Material
  • Transparency
  • Reflectance
  • Anchored
  • CanCollide
  • Locked

Github

PR’s are appreciated!

Use Cases

  • Unlock areas of the map as the player progresses

Have fun!

10 Likes

that sounds cool, I might use it sometime!

1 Like

is it an april fools joke though

No, it’s actually not lol

I already rickrolled youtube and IRL acquaintances, im done with april-fooling for this year :wink:

Very nice! But I want to ask: What does this do? When I convert a part theres a script or module script containing the parts properties or what?

It creates a normal script in Workspace that look like this:

local part1 = Instance.new("Part", game.Workspace)
part1.PROPERTYONE = VALUEONE
part1.PROPERTYTWO = VALUETWO
part1.PROPERTYTHREE = VALUETHREE
local part2 = Instance.new("Part", game.Workspace)
part2.PROPERTYONE = VALUEONE
part2.PROPERTYTWO = VALUETWO
part2.PROPERTYTHREE = VALUETHREE

Obviously there are more properties per part (refer to the post for the full list) but that’s just an example.

So it is exaclty what I said, right?

It doesn’t “contain” the part’s properties like a table, but it recreates the parts exactly how they were in Edit mode.

1 Like

Does it round floating-point errors? For instance, 1.72566666666631 > 1.726

1 Like

Use Cases

  • Unlock areas of the map as the player progresses

i do not see the point of it… Storing the maps/parts in the replicated storage then clone and put it into the workspace when the player progresses isn’t more simple ??

Honnestly i really like your feature but i do not think it will be usefull in the most of case ^^

No, I actually just noticed that right before I had to go yesterday. I’ll fix it once I get on PC.

Idk, it’s just a potential use case, there’s probably many more that I can’t think of. This is just a fun plugin I made in my spare time yesterday since it could help a few people.

It can be usefull if someone want to make a whole game only with scripts, like a funny challenge or something like this lol

1 Like

Your code is lacking many useful properties, including CastShadow, Massless, CustomPhysicalProperties and perhaps for some use cases, surface inputs and surfaces. I would also suggest supporting Attributes, given their novelty and wide range of functionality. Furthermore, MeshParts are completely unsupported, and I would also recommend asserting that the selection actually consists of parts.

Reinstancing is not a good idea.

Most systems which frustum cull just parent the parts outside of the players view to nil and then reparents when that part is in view.