Assigning Multiple Numbers From Serial to Float

your snippet doesn't tell the whole story...

what commands would your code expect?

(e.g. 'b' followed by a number followed by a new line character)