So im making a showcase thing so when you buy a gamepass you get a chat color but it is telling me that
GamePassId '14802731' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.
When its a gamepass (Its not working with PlayerOwnsAsset)
Here is the script thanks in advanced.
local MarketPlaceService = game:GetService("MarketplaceService") local Player = game:GetService("Players").LocalPlayer local PremId = 14802731 local EliteId = 14802760 local settingsNorm = { BubbleDuration = 15, MaxBubbles = 3, BackgroundColor3 = Color3.fromRGB(186, 250, 112), TextColor3 = Color3.fromRGB(57, 59, 61), TextSize = 16, Font = Enum.Font.GothamSemibold, Transparency = .1, CornerRadius = UDim.new(0, 12), TailVisible = true, Padding = 8, MaxWidth = 300, VerticalStudsOffset = 0, BubblesSpacing = 6, MinimizeDistance = 40, MaxDistance = 100, } local settingsPrem = { BubbleDuration = 15, MaxBubbles = 3, BackgroundColor3 = Color3.fromRGB(250, 178, 247), TextColor3 = Color3.fromRGB(57, 59, 61), TextSize = 16, Font = Enum.Font.GothamSemibold, Transparency = .1, CornerRadius = UDim.new(0, 12), TailVisible = true, Padding = 8, MaxWidth = 300, VerticalStudsOffset = 0, BubblesSpacing = 6, MinimizeDistance = 40, MaxDistance = 100, } local settingsElite = { BubbleDuration = 15, MaxBubbles = 3, BackgroundColor3 = Color3.fromRGB(170, 0, 0), TextColor3 = Color3.fromRGB(57, 59, 61), TextSize = 16, Font = Enum.Font.GothamSemibold, Transparency = .1, CornerRadius = UDim.new(0, 12), TailVisible = true, Padding = 8, MaxWidth = 300, VerticalStudsOffset = 0, BubblesSpacing = 6, MinimizeDistance = 40, MaxDistance = 100, } pcall(function() if game:GetService("GamePassService"):PlayerHasPass(Player, PremId) then game:GetService("Chat"):SetBubbleChatSettings(settingsPrem) elseif game:GetService("GamePassService"):PlayerHasPass(Player, EliteId) then game:GetService("Chat"):SetBubbleChatSettings(settingsElite) else game:GetService("Chat"):SetBubbleChatSettings(settingsNorm) end end)
Example Script;
local MarketPlaceService = game:GetService("MarketPlaceService") local PlayerBoughtThisGamePass = MarketPlaceService.UserOwnsGamePassAsync(Userid, GamePassIDHere) if PlayerBoughtThisGamePass then print("Player Has Bought This GamePass") end