At the top of my script, I declare a variable as an empty array. The debugger agrees with this. However, the variable randomly decides to become nil and it destroys the functionality of the code. I know this is not an issue in my script because it is NEVER set to nil, it is only ever overwritten with another empty array when that needs to happen.
I was able to temporarily fix this once by restarting studio, but it shortly came back. Does anybody know a fix for this? I am going to re-install studio now.
It would be helpful if you’ve shared the code if that’s possible
Uhh I found a sort-of solution. Apparently it’s just a visual bug. So I can just pretend the array and its contents exist like normal, even though the debugger says otherwise. Thanks anyone who read and thought about it!
The full code is pretty big in size, I will share it if you are interested in reproducing the bug. However, I am fairly confident this is just an issue with the way studio handles the state of the code with the debugger.
Also, the “destroyed functionality” I was talking about was my own fault (a typo). The variable itself was not destroyed, it was only visually displayed as nil within the debugger
1 Like