the script is too long to post
Any time you see attempt to ... a nil value
in your code, you can be sure that there exists some variable that is not defined that should be.
This can happen in a few ways:
local assignLater; -- (later never comes) print(assignLater.something) --> attempt to index 'assignLater' (a nil value)
print(workspace.doesntExist); --> attempt to index workspace for 'doesntExist' (a nil value)
nil
, etc.In your case, somewhere in your code you are using the length operator (#
) on a variable that isn't defined. This variable is most likely supposed to be an array or a string, since those are the only datatypes you can use this operator on.
You can simulate this error by doing the following:
local some_nil_value = nil; print(#some_nil_value) --> attempt to get length of a nil value