I’m currently working on this UGC marketplace area and I’m creating these auto-updating podiums, which sounds cool and all but comes with its problems. I’m trying to make the system detect if an item is limited, then enable a few UI elements to show that it’s limited, as seen here:
The only problem is that the elements don’t actually appear when the item is limited at all. Here’s my code:
if itemInfo.IsLimitedUnique or itemInfo.IsLimited == true then
limitedTag.Visible = true
remaining.Visible = true
remaining.Text = 'Remaining: '..tostring(itemInfo.Remaining)..' / '..tostring(stock)
else
limitedTag.Visible = false
remaining.Visible = false
end
And now, despite the item being a limited, it still won’t work…
Its probably best to debug that GetProductInfo is actually marking the item as Limited, might behave weirdly with UGC items because Roblox:tm:
EDIT
This does work but its probably not doing what you think it does.
a or b == true is checking that a is a non-falsey value (false/nil) or that b equals true. It does not check if a or b equals true. The correct statement here would either be simply if a or b then or if a == true or b == true then