https://prnt.sc/1qcvxu8 Dropper script
https://prnt.sc/1qcw1rp Purchase script
I am pretty inexperienced in programming and wanted to create a really basic tycoon and had this as my dropper script. When you purchase the dropper, it moves the dropper from server storage to the "objects" model (in the tycoon) and there is an if statement checking if the model's parent is the objects model. Sometimes it works when I test it and sometimes it drops in bursts of two. (By sometimes it works and sometimes it doesn't, I mean sometimes when I test it, it always drops one and other times it will always double drop, not just sometimes it will drop two and other times it will drop one)
I tried a lot of fixes and ended up with this code since I thought the problem could be that the loop is being started more than once, so I made only one loop that runs continuously, but the bug still happens.
Also sorry if my code is messy
I tried moving all of the droppers to server storage, to begin with, instead of having a loop that runs at the start and moves all of them to server storage and the bug was resolved. I still don't have any idea why it was happening or how this fixed it, but I guess my question is answered