Why is it telling me "Invalid arguments"?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    My problem is that I am trying to require a ModuleScript via a Script; but it tells me “invalid arguments”.

  2. What is the issue? Include screenshots / videos if possible!
    See screenshots.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Yes. I’ve only found ONE post about it, however, and that did not fix my problem. I tried to move things around, no solution.

Screenshot 2024-11-02 182701


Oh and if it matters, this is an attempt to make a Map loading system. I’ve also never run into this issue before.

1 Like

I have no idea what’s wrong, maybe you should change it from :WaitForChild() to :FindFirstChild()

That’s something I tried, same error. (I also moved the ModuleScript to the main SSS, and re-arranged the waitforchild function, no result.)

Make sure that the module script is returning something, and if that doesn’t work then restart Studio.

  1. It does return something.
  2. Restarting studio has no effect. (I just did it)

This is probably a #bug-reports at this point
Maybe you could re-install studio?

i’ll post in bug reports if this issue isn’t solved by the end of the week since i want to make sure there’s not some underlying and hidden issue

Is anything deleting your ModuleScript before you require? Also incase there is an issue, make sure the ClassName is ModuleScript

Okay, I’m such an idiot.
It turns out I had a disabled script called MapSpawn too.
Changing it fixed the issue.

1 Like

Glad you found the solution! :grinning:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.