I have a game with a single Script/LocalScript in it - as shown by Lines of Code. I also have only one ModuleScript that has the name “Updates” as shown by explorer, and within the script, the very first action taken by the script, is being called twice as shown by the output, 3 seconds apart.
I’ve checked in-game, and I can’t find any evidence of it being :Cloned(), and even if it were, I would expect the GetFullName to be different. Similarly, I added a task.delay to confirm that it’s still there, and when I look in workspace after 5 seconds, even though 2 of them should be there, only one is. I’ve also rebooted studio and my computer.
So, any other thoughts how this could be happening?
Turns out it’s because I recently wrote a plugin that had a wild require(game.ReplicatedStorage.Lib:FindFirstChild(“Updates”, true)) that I missed.
The reason I found out about this is because the normal script was calling require() and variables being set at the top of the script were being changed. (e.g. you make a BindableEvent, listen to it, and never change it, and then somehow a separate BindableEvent is being called later because the script’s cache was being replaced).
This suggests that if a plugin require() s a ModuleScript in studio, it overwrites any cache made by another script.