Parts Storage||doc136840

September 20, 2022

PartStorage

Only the server can access

Brief Introduction

Part warehouse is a component library for storing parts, which can easily clone prefabricated parts through code.

image.png

Code example

Get the instance of the part warehouse and clone the part named "slavepart"

-- get parts storage
local partStorage = Game.GetService("PartStorage")

--Clone a part named "SlavePart"
local part = partStorage:FindFirstChild("SlavePart"):Clone()

--Place the cloned part into the map001 map
local map = World:GetStaticMap("map001")
part.Parent = map.Root