What I mean is, if my script is 1000 lines of code long, is it more likely to fail then if it was only a hundred lines long, with everything else being equal?
It seems like my tests are failing randomly just because my script is long
The longer a script you write is, the more chances you have for making a mistake while you are writing it.
That said, it is not the case that

tests are failing randomly just because my script is long

Your tests are likely failing because there is an error somewhere, either in the tests or the logic in your script.
Does length of an automation script directly determine its likelihood of failing?