How to clone UI based on IntValue value?

Hi.

I can’t seem to figure out on how to clone a UI as much times as an IntValues value.
It is really difficult to explain, but hopefully you know what I mean.

Here is my current code:

hrtsint.Changed:Connect(function()
	if hrtsint.Value > 0 then
		hrtclone = hrt:Clone()
		hrtclone.Parent = hrtsgui

		local number = Instance.new("IntValue", hrtclone)
		number.Value = hrtsint.Value
		number.Name = "hrtNumber" .. number.Value
	else
		for _, v in pairs(hrtsgui:GetChildren()) do
			if v:IsA("ImageLabel") and v.Name == hrtclone.Name and v ~= nil then
				v:Destroy()
				v = nil
			end
		end
		return
	end
end)

What I want to do is clone the UI based on the value of an IntValue.
How would I achieve this? Any help would obviously help.

(im probably never gonna get help ;-; )

1 Like

I apologize for being moody while posting this, what I said was wrong.

1 Like

imagine giving a solution to yourself

1 Like

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