Kinemium Docs

Instances and Hierarchy

Understand Kinemium's registry-backed object model and hierarchy lifecycle.

Instances and Hierarchy

Kinemium's object model is registry-backed. Registered class modules live in src/environment/class/list; creating a class validates it, creates the base instance, then executes that class's initializer.

Create and parent an instance

local Workspace = game:GetService("Workspace")

local folder = Instance.new("Folder")
folder.Name = "RuntimeObjects"
folder.Parent = Workspace

local part = Instance.new("Part")
part.Name = "Platform"
part.Parent = folder

Find objects

local platform = folder:FindFirstChild("Platform")
local parts = folder:GetChildrenOfClass("Part")

for _, descendant in folder:GetDescendants() do
    print(descendant:GetFullName())
end

React to hierarchy changes

folder.ChildAdded:Connect(function(child)
    print("Added:", child.Name)
end)

folder.DescendantChanged:Connect(function(object, property, value)
    print(object.Name, property, value)
end)

Cloning

Clone() reinitializes the clone through the class registry and then copies class state/hierarchy.

local copy = part:Clone()
copy.Name = "PlatformCopy"
copy.Parent = folder

See the Instance reference for core methods and signals.

On this page