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

Checking if creator has t-shirt not working?

Asked by
unmiss 337 Moderation Voter
8 years ago

Hey.

Code for getting creator's id:

function checkcreatorifuser()
    if game.CreatorType == Enum.CreatorType.User then
        crtrid = game.CreatorId
    end
end

Code for pass, THIS IS A SNIPPET OF A SCRIPT:

    elseif credit == 'Paid' then
        local asset = 261086792 -- thing
        checkcreatorifuser()
            if game:GetService('MarketplaceService'):PlayerOwnsAsset(crtrid,asset) then
                print('Owner has a confirmed purchase of the product and branding is disabled.')
            else
                print("No")
                credit = 'Warning'
        end
    end
end)

Again, there's an elseif and stuff because it's a snippet of a script. Maybe I'm doing this wrong? I dunno.

Answer this question