Hello there, so basically I want to make an inventory system, and since I’ve never made one before, I was looking at multiple free models and inspecting their code, and one of the models had this line of code,
so basically my question is
what does this part do?
Obj1.Position = UDim2.new(0,0,0,20*i-20)
If anyone can help me, please tell me.
(btw, I’m talking about the math part, specifically the 0,0,0,20*i-20 part)
It multiplies 20 by i, i probably the current iteration for the numeric for, and subtracts by 20 to account for the first item, otherwise there’ll be a space where one could be (basically if not for it, they’d be out of order).
EDIT
Wrote up something real quick, this’s what’ll happen if the -20 was excluded.