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

Asset.Title returning nil? Please help!

Asked by 6 years ago

I'm trying to check forever if an asset's name is house, but the asset's name keeps returning nil!

local updateMsg = 'AWWWWWWWW'
while wait(1) do
    local e = game.MarketplaceService:GetProductInfo(1532392008,Enum.InfoType.Asset)
    if e.Title ~= 'house' then
        print(e.Title)
        print(updateMsg)
    end
end

I added print e.Title to debug, and it kept printing nil. Any help would be appreciated!

1 answer

Log in to vote
0
Answered by
Rare_tendo 3000 Moderation Voter Community Moderator
6 years ago

The Name of the asset in the array is indexed as 'Name', not 'Title'.

print(e.Name)
0
Thanks a lot! brokenVectors 525 — 6y
Ad

Answer this question