Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do you find out what size a part is in if statements?

Is it like this?

if part.Size == Vector3.new(5,5,5) then

OK, so I just figured out that sometimes this works and sometimes don't, because the size of a part usually goes up and down very very very slightly sometimes, so how do you prevent it?

For example: A big part with the size 500,1,500 can sometimes become 500,1.00000000005,500 and yeah... that's really annoying

1 answer

✓ Accepted answer

The same way you might compare two part positions. They likely won't be exactly the same so check an arbitrary distance.

if (part.Size-Vector3.new(5,5,5)).Magnitude < 0.1 then

This discussion is preserved as it was. New answers, comments, and votes are closed.