Scripts randomly stopped working

Hello. So my dialog script stopped working and I don’t know why as I asked my friends and they haven’t touched my scripts at all.

Here are the error messages.
image
The first 2 errors are when I open the GUI, and the last error occurs when I try to close the GUI.

Here are the scripts.
image
(regular script)

(put in a local script)


the module script

Sorry if I made any mistakes in the code I recently started scripting a few weeks ago.

The value you used to index the module is set to another variable which is an empty string.
“npcCurrent” doesn’t seem to change in the script anywhere.


ScreenShot_20210628231256

I looked into my other saves when this script was working, and I found out that this variable wasn’t there before. Thanks! :grinning: