|
| 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 |
|
|
| |
|
| |
|
|
| 27 Jun 2014 02:50 AM |
| show us the whole script, or more so we can know what the variables do |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 27 Jun 2014 02:57 AM |
| Oh, okay. I guess I could use GetProductInfo to find the creator. |
|
|
| Report Abuse |
|
|