"The player with userId=..."

I keep getting this warning in-game


What does it mean? I don’t know which script is producing it, or which method/function.

Is there any chance that you are using the Players:GetPlayerByUserId method anywhere in your scripts? It might be creating that warning for some reason.

1 Like

Could be, but doesn’t that method work like FindFirstChild, where it returns nil without this warning if it doesn’t find anything?

Ya, it’s not GetPlayerByUserId, I tested it out

1 Like

There is a shortcut for searching a keyword between all scripts in a place, Ctrl+Shift+F. You can search for The player with userId= either while in studio or during runtime, and seeing if any scripts match the keyword.

1 Like

That will only work if he hardcoded the userid into the game, this error happens when you try getting something like a badge or a pass for a non-present player. Try doing what @goldenstein64 said, but with different services which could require a userid.

2 Likes