I want to make a tycoon for me and my friends to play, but the collector for the dropped parts keeps making an error when I create the drops really fast (There is no error if I make the parts slowly). The game still works as normal however, which confuses me. The following images contains the error as well as the script where the error occurred.
The Error.
The Script where the error occurred.
I have come up with no solutions so far.
[EDIT: If I remove the error Hit.Parent.Name == "Part"
and just leave it with Hit.Parent:FindFirstChild("CashValue")
I get attempt to index nil with FindFirstChild
as an error.]