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 |
|
|
| |
|
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
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
|
| 22 Aug 2013 12:38 AM |
| Not im trying to grab items off catalog. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
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
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 22 Aug 2013 12:41 AM |
| It should, assuming Roblox fixed its bug |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 22 Aug 2013 12:43 AM |
@cnt:
So it wont work, is that what you are saying? |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
| |
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
| |
|
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
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
| |
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|