The second loop has the type error inferring it with the type Model? even though it was cleared to be a Model before. I already check if “closestChanger” is nil beforehand, so it doesn’t error for the first loop, however it does so for subsequent loops.
The type inference changing back to Model? seems to only happen after using the variable in a loop,
otherwise it works fine.
It seems to work properly if closestChanger isn’t set in an if statement though.
Place file:
Place1.rbxl (62.5 KB)
Expected behavior
I expect that there should be no type error.



