generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why cant we check player assets?

Previous Thread :: Next Thread 
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 12:35 AM
game.Players.PlayerAdded:connect(function(plr)
if game:GetService("MarketplaceService"):PlayerOwnsAsset(plr,30331986) then
print(plr.Name .. " owns the Midnight Shades")
else
print(plr.Name .. " doesn't own the Midnight Shades")
end
end)

To see if someone owns the item...?
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
22 Aug 2013 12:37 AM
BadgeService:UserHasBadge
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
22 Aug 2013 12:38 AM
Roblox glitched a lot of the methods, use what notun said, though userhasbadge will only work in normal scripts (not local)
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 12:38 AM
Not im trying to grab items off catalog.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
22 Aug 2013 12:39 AM
It still works
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 12:40 AM
the function in the script I gave works?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
22 Aug 2013 12:41 AM
It should, assuming Roblox fixed its bug
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 12:42 AM
It didn't work in studio try it out see if it works for u.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
22 Aug 2013 12:43 AM
@cnt:

So it wont work, is that what you are saying?
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
22 Aug 2013 12:43 AM
It __should__ but a couple days ago, it stopped working.
I'm pretty sure roblox fixed this, idk
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 12:45 AM
It just stopped working? this is a useful feature...
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 12:52 AM
lol
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 02:14 AM
answerr
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
22 Aug 2013 02:22 AM
They already said use BadgeService. BadgeService checks the asset even if it isn't a badge.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 02:40 AM
It doesn't work.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
22 Aug 2013 02:46 AM
game.Players.PlayerAdded:connect(function(plr)
if game:GetService("BadgeService"):UserHasBadge(plr.userId,30331986) then
print(plr.Name .. " owns the Midnight Shades")
else
print(plr.Name .. " doesn't own the Midnight Shades")
end
end)

-- Is this the code you ran? And it will not work in studio test mode.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 02:54 AM
bgid = 113328574
userid = 336035
while true do
wait(1)
if game:GetService("BadgeService"):UserHasBadge(userid, bgid) then
script.Parent.Name = userid
else
script.Parent.Name = "This user doesnt have this item"
end
end
I did that
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
22 Aug 2013 02:57 AM
Why are you using that userId? And what is the parent of this script?
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 02:59 AM
Parent of the script is a model and its if I wish to check if another user owns that item.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
22 Aug 2013 03:04 AM
How can you check the model name in online mode?
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 03:06 AM
.... Its script parent it means the script is in the model simple lol has nothing to do with that.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
22 Aug 2013 03:09 AM
I know what it means, I mean, you are changing the name of the model, right? Well, how can you check the model name in online mode. You must run this code in online mode.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
22 Aug 2013 03:12 AM
I just tested it myself and it works fine. You must be doing something wrong.
Report Abuse
enyahs7 is not online. enyahs7
Joined: 25 Apr 2008
Total Posts: 9820
22 Aug 2013 03:19 AM
It does not let me check if other userids have the asset id only mine.
Report Abuse
yoshimaster240102 is not online. yoshimaster240102
Joined: 14 Apr 2012
Total Posts: 470
22 Aug 2013 08:41 AM
If its only you, you should make it so it functions only if a player respawns or has entred the server.

~Derpo is da king of Derpyness~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image