Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Check if a player owns model using user ID?

So recently I was thinking on how in FE2 Map Test, Crazyblox(creator) made it so that you can only load in models(maps) that are in his inventory.

I tried recreating this but hit a roadblock. First, I tried using MarketPlaceService, but it doesn't seem to do the job, since it requires a player Instance. I want to know how to check using a user ID.

Then, I looked through the internet but couldn't find anything helpful :(

And now I come here to ask some amazing scripters with way better knowledge than me because I am mostly inexperienced.

I hope somebody knows that answer to this sort of complex question.

Thanks!

1 answer

✓ Accepted answer

You answered your own question.

The only thing now is use the marketplace service and :GetPlayerFromUserID() function.

https://developer.roblox.com/api-reference/function/Players/GetPlayerByUserId

4 comments

0

Not exactly sure how to do this. Maybe a bit more explanation would help? Maybe it isn't the way to do it?

0

Your going to have to do what you did first, MarketPlaceService. Instead of attaching the player directly into the argument, use game.Players:GetPlayerFromUserId(userid_here) and then putting that in the argument. It should return the player instance that’s connected to the userid

0

Worked. Thanks

0

Anytime chief.

This discussion is preserved as it was. New answers, comments, and votes are closed.