for i,v in pairs(script.Parent.Holder["1"]:GetChildren()) do if v.Position < UDim2.new(0.056, 0,0.747, 0) then -- or > still didn't work v:Destroy() end end
error: attempt to compare two userdata values
idk what's the reason i just wanna fix that very quick
I can't confirm this as a working solution since this is sort of guess work..
local function Compare(UDim1,UDim2) local xs1 = UDim1.X.Scale local ys1 = UDim1.Y.Scale local xs2 = UDim2.X.Scale local ys2 = UDim2.Y.Scale if xs1 > xs2 and ys1 > ys2 then return true end end for i,v in pairs(script.Parent.Holder["1"]:GetChildren()) do if Compare(v.Position,UDim2.new(0.056, 0,0.747, 0)) then -- or > still didn't work v:Destroy() end end