Attempt to index nil with UserId

I’m trying to follow a tutorial on youtube posted by Spook on how to use Profile Service, but I’m running into problems. I’ve watched, rewatched, paused, and swear I’ve done everything spook has, but it’s just not working for me. I need another set of eyes to help me spot the problem, please!

I’m getting the following error:
DataServiceIssues1
This is the module, located in Server Storage(2 pics)



and this is my script in ServerScriptService:
DataServiceIssues4

As you can see, I’ve put print in a few places to find where exactly the problem is. I’ve added wait, so my char will load, I’ve put enough time to check and make sure my char loaded with UserID, and even though I can see it in properties, I still get this error from the script. Any help will be greatly appreciated!

side note: sometimes I can print my userID, sometimes I can’t. I’m hoping I didn’t break something on my computer.

1 Like

Remove the Parenthesis.

So it should be:

Players.PlayerAdded:Connect(PlayerAdded)

-- not this:
Players.PlayerAdded:Connect(PlayerAdded()) -- Parenthesis causes errors
1 Like

OMG you are a life saver. It worked, but not I need to hunt this one down :smiley:
newissue1

You misspelled the function, the D in ID is supposed to be lowercase, It is supposed to be: AddUserId

You saved me so many hours. Thank you!!!

1 Like

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