Determining Price by Size

cash.Value *= part.Size * 10

Why doesn’t this not work? I think it might be because part.Size is getting the X, Y, and Z size, but I don’t know how I would make that into 1 number.

Any help is appreciated!

You can convert size into volume multiplying xyz assuming its a rectangular box shape.

Or you can use .Magnitude which is the length of thr corner to corner vector assuming its a box shape.

1 Like
cash.Value *= (part.Size).Magnitude * 10

Yes, it is a box shape, and this is what I put, and it didn’t work.
(no errors, but the price = 0)

If this is not the way to do it, could you possibly show me an example?

Something like this should work:

local RoundedSize = (part.Size.X+part.Size.Y+part.Size.Z)/3

cash.Value *= RoundedSize * 10
1 Like

Yes that worked perfectly! Thank you!

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