Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I make an object serialize plugin?

Asked by
zblox164 531 Moderation Voter
5 years ago
Edited 5 years ago

So I recently saw a few plugins that serialize an instance into code form. It even worked with models. When the script that the plugin created was in workspace and I opened it up the lines of code were still being written with no typing at all from me. I have not seen a wiki page for this or any information at all so hopefully someone here can help. Thanks!

Note: The reason why I don't have any code to show is because I don't know where to start.

I got the plugin to collect all the properties on the baseplate and here is what it wrote for me:

local Baseplate1 = Instance.new("Part")
Baseplate1.RightParamB = 0.5
Baseplate1.TopSurfaceInput = Enum.InputType.NoInput
Baseplate1.Anchored = true
Baseplate1.RightSurface = Enum.SurfaceType.Smooth
Baseplate1.BottomParamB = 0.5
Baseplate1.FormFactor = Enum.FormFactor.Symmetric
Baseplate1.FrontParamB = 0.5
Baseplate1.BottomSurface = Enum.SurfaceType.Inlet
Baseplate1.CanCollide = true
Baseplate1.BackSurfaceInput = Enum.InputType.NoInput
Baseplate1.LeftSurface = Enum.SurfaceType.Smooth
Baseplate1.Elasticity = 0.5
Baseplate1.Transparency = 0
Baseplate1.BackParamB = 0.5
Baseplate1.TopSurface = Enum.SurfaceType.Studs
Baseplate1.RightParamA = -0.5
Baseplate1.Reflectance = 0
Baseplate1.Parent = Workspace
Baseplate1.TopParamB = 0.5
Baseplate1.TopParamA = -0.5
Baseplate1.LeftSurfaceInput = Enum.InputType.NoInput
Baseplate1.LeftParamB = 0.5
Baseplate1.Locked = true
Baseplate1.Material = Enum.Material.Plastic
Baseplate1.Archivable = true
Baseplate1.Size = Vector3.new(512, 20, 512)
Baseplate1.FrontSurface = Enum.SurfaceType.Smooth
Baseplate1.BackSurface = Enum.SurfaceType.Smooth
Baseplate1.RightSurfaceInput = Enum.InputType.NoInput
Baseplate1.BackParamA = -0.5
Baseplate1.FrontSurfaceInput = Enum.InputType.NoInput
Baseplate1.FrontParamA = -0.5
Baseplate1.BottomSurfaceInput = Enum.InputType.NoInput
Baseplate1.Color = Color3.new(0.388235, 0.372549, 0.384314)
Baseplate1.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
Baseplate1.BottomParamA = -0.5
Baseplate1.BrickColor = BrickColor.new("Dark stone grey")
Baseplate1.Position = Vector3.new(0, -10, 0)
Baseplate1.Friction = 0.30000001192093
Baseplate1.LeftParamA = -0.5
Baseplate1.Shape = Enum.PartType.Block
Baseplate1.Name = "Baseplate"
0
How do you not have code, but you "When the script was created and I opened it up"? User#19524 175 — 5y
0
That was the script that the plugin created zblox164 531 — 5y
0
Can you provide it...? If a plugin creates a script, it has to be in the Explorer somewhere. User#19524 175 — 5y
1
sure zblox164 531 — 5y
0
What I need don't know is how to convert the properties of a instance into Lua form zblox164 531 — 5y

Answer this question