Hello. I tried making a list GUI but when I try to do
local Size = script.Parent:FindFirstChild("Example").Size.Y
while true do
wait()
local wWorkspace = game.Workspace:GetChildren()
local Delete = script.Parent:GetChildren()
for i=1,#Delete do
if not Delete[i].Name == "Example" or not Delete[i].Name == script.Name then
Delete[i]:Remove()
end
end
for i=1, #wWorkspace do
local Button = script.Parent:WaitForChild("Example"):Clone()
Button.Name = "Item/"..wWorkspace[i].Name
Button.Parent = script.Parent
Button.Text=wWorkspace[i].Name
Button.Position = UDim2.new(0,0,#Delete * Size,0)
Button.Visible= true
end
end
it gives me:
attempt to perform arithmetic on local 'Size' (a userdata value)
The Size variable is the size of a Button. Any help?
