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: AssetID Help

Previous Thread :: Next Thread 
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
26 Jun 2014 05:41 PM
I am getting an error message from this line of code, I cant see why?

if v:IsA("Player") and v.userId == assetId.CreatorId then

Attempt to index local 'assetId' (a number value).
-----------
If you would like the script up until that part, here it is.

local MarketplaceService = game:GetService("MarketplaceService")
MarketplaceService.PromptPurchaseFinished:connect(function(player, assetId, isPurchased)
if isPurchased then
for i,v in pairs(game.Players:GetChildren()) do
if v:IsA("Player") and v.userId == assetId.CreatorId then
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
26 Jun 2014 06:01 PM
Bump
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Jun 2014 02:48 AM
Bump
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
27 Jun 2014 02:50 AM
show us the whole script, or more so we can know what the variables do
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
27 Jun 2014 02:51 AM
Ah, I only read the first part. Let me check what "assetid" is, since I don't use this;
Report Abuse
sonicdiablo is not online. sonicdiablo
Joined: 05 Feb 2009
Total Posts: 1661
27 Jun 2014 02:53 AM
Like the error says, assetid is a number, not a table. So you can't do assetid.creatorid, it would be the same as doing 2135435.creatorid ;
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
27 Jun 2014 02:57 AM
Oh, okay. I guess I could use GetProductInfo to find the creator.
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