Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Check if a player owns model using user ID?

Asked by
U_srname 152
4 years ago

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

Log in to vote
0
Answered by
SmartNode 383 Moderation Voter
4 years ago

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

0
Not exactly sure how to do this. Maybe a bit more explanation would help? Maybe it isn't the way to do it? U_srname 152 — 4y
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 SmartNode 383 — 4y
0
Worked. Thanks U_srname 152 — 4y
0
Anytime chief. SmartNode 383 — 4y
Ad

Answer this question