Scripting help : Enum.Font:GetEnumItems()

local Template = script:WaitForChild(“Template”)

for _, v in pairs(Enum.Font:GetEnumItems()) do
local Cloned = Template:Clone()
Template.Text = v.Name
Template.Font = v
Template.Parent = script.Parent.Font.Fontlist.ScrollingFrame
end

화면 캡처 2024-03-18 162138
화면 캡처 2024-03-18 162116

I want to create a font selection box like this.
But the code doesn’t work.

Your script creates a clone but then (re)configures the template.

local Template = script.Template
local ScrollingFrame = script.Parent.Font.Fontlist.ScrollingFrame

for _, v in Enum.Font:GetEnumItems() do
    local Cloned = Template:Clone()
    Cloned.Text = v.Name
    Cloned.Font = v
    Cloned.Parent = ScrollingFrame
end

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.