Infinite yield possible on ReplicatedStorage ModuleScript?

I am getting a warning that says,
Infinite yield possible on 'ReplicatedStorage.Scripts:WaitForChild("GetStats")'

Here is my Explorer:

I am using GetStats in many Local and Non-Local Scripts and destinations in the explorer.

How am I getting this error when GetStats is RIGHT THERE in the Explorer?

Here is my the code I am using to retrieve GetStats:

local get_stats = require(game:GetService("ReplicatedStorage"):WaitForChild("Scripts"):WaitForChild("GetStats"));
1 Like

Try this:

local rep = game:GetService("ReplicatedStorage")

local get_stats = rep:WaitForChild("Scripts"):FindFirstChild("GetStats")

If thay doesn’t work. Check for spaces in the module name.

Possibly you named the ModuleScript GetStats with a space at the end?

1 Like

Wow. I never would have gotten this

This is a silly problem and I thank you.

1 Like

He isn’t an idiot, your solution didn’t work. Don’t yell at someone because they didn’t select your solution.
You just wrote his code differently, Aidan identified the issue.

She came first mate, or at least I saw it first.

Never mind I saw the end of the reply, either way don’t call someone an idiot over it