How do I close a string with ‘’ as the ending? Doing it in the normal way is not letting me
You escaped the quote after the second comma using the \
Your line should be:
local modelName = string.gsub(modelImportJson, "ReplayMod/ModelJson", "")
Do you want the backslash in there? If so, add another one.
...ModelJson\\","")
Backslashes are special characters and form escape sequences. In the case, you escaped the quotation mark and made the quotation mark part of the string instead of having the quotation mark close the string. The backslash would have been erased once the code was compiled.
Adding the second backslash escaped the backslash instead, making it part of the string.
It’s similar to \n, which you’ve probably seen.
You can find some info here.
https://www.lua.org/pil/2.4.html
Generally most of them are universal across programming languages.