"The specified user does not exist!"

A lot of scripts in my place have worked completely fine for the past few months, both in studio and in-game.

I’ve recently started getting this error in studio when launching a test server:
image

Does anyone know what it’s caused by? All I’m referencing at that source is the LocalPlayer in a LocalScript.

1 Like

Do you have a:

repeat wait(0.1) until game.Players.LocalPlayer

or something similar, as it may be calling before the player exists yet.

I’ve had one, yes. That’s why it’s odd to me that it’s deciding to break now.

Yeah, it is very odd. Only other thing I can think of is if you changed something else which broke it.

I didn’t change anything :sad:, the only thing I can think of is using UserHasBadgeAsync.

Is there any chance they changed it?

Is that serverside? I don’t think you can call that from LocalScript, but I could be wrong.

Off-topic but FYI, Players.LocalPlayer is guaranteed to be defined client-side, you don’t need to wait for it to exist.

1 Like

It is server-side, I use RemoteEvents and RemoteFunctions to relay the relevant info back to the client.

That’s true

Do you think it’s possible the negative/0 PlayerIds of test players could be the issue?

Try it in-game perhaps

I think I figured it out.

UserId 0 is what’s throwing the “user does not exist” error. All the negative ID users are fine.

Was this changed in studio somehow? I don’t remember the test users starting at 0 in the past, and they would start at -1. Because this might actually be a bug then.

I see, you’re probably right. Test player ID does start at zero though.

1 Like

Maybe, I guess I just don’t see why it’d start acting up now after a year of no change.

1 Like

Yeah, that is quite strange.