How can I access this module script that’s inside the replicated storage
The issue is that waitforchild returns nil, even though I spelled it correctly
I have tried putting the the 2nd parameter for waitforchild but it still doesn’t work
local rs = game:GetService("ReplicatedStorage")
local spinnerContents = rs:WaitForChild("SpinnerContents", 3)
print(spinnerContents)
Make sure that the SpinnerContents module exists at the time the script executes, also remove the 3 second timeout from the WaitForChild method call as this won’t help in that situation.
Hastily copy pasted, but you know what I meant. He wasn’t requiring the module. I just tried doing the same thing with a module that didn’t have a return value and one that errored. Both still returned the name of the module, so something’s up with this.
Try checking if the script even exists at run-time, because it should still print out the name of the module regardless of any errors. Another script could possibly be deleting it, just a guess
Try making a repro file, or just insert a new blank baseplate and create a module script in replicated storage and a script anywhere requiring it. This kind of behaviour is unexpected
It’s just a file with the bare minimum scripts to reproduce the behaviour you’re describing. Maybe try sending the SpinnerContents module because I can’t recreate this behaviour myself. Maybe something’s up with the script?
That’s really, really strange. Even though you’re not returning contents and the loop isn’t closed (maybe it’s just a snippet, though), the script still returns for me. Trying parenting it to something like ReplicatedFirst, renaming it, and requiring it form a totally new and different script.