Bad argument #2 to '_sub' vector expected, got number

Hello, the error is on this line:

local hullxymax = math.Round(math.Max(ent:OBBMaxs() - ent:OBBMaxs().x * ((ent:GetAngles().y % 90)/90), ent:OBBMaxs().y + ent:OBBMaxs().x * ent:OBBMaxs().y * ((ent:GetAngles().y % 90)/90)), 1)

The error is in

ent:OBBMaxs() - ent:OBBMaxs().x

ent:OBBMaxs() is a vector and ent:OBBMaxs().x is a number. You can’t subtract vectors from numbers or vice versa. Also you shouldn’t write everything in one line and use more variables, so you will find your error faster next time.