So I’ve recently been making a seat booking system, and it uses MarketplaceService:PlayerOwnsAsset(). However, I have a problem where I wanted to change a value inside of player if they own the asset (for example a t-shirt) but it doesn’t seem to work, even if player owns the asset. I’ve also made a TextLabel to check if player owns it, but the result is still the same - it shows that the player doesn’t own it.
-- Locals local Players = game:GetService("Players") local MarketplaceService = game:GetService("MarketplaceService") local exaBS_Storage = game:GetService("ReplicatedStorage") local exaBS_PF = script.exaBookingSystem_PF local ecValue = exaBS_PF.economyClassValue local bcValue = exaBS_PF.businessClassValue local fcValue = exaBS_PF.firstClassValue -- [ CLASS CHECK ] local bcID = game.ReplicatedStorage.exaBoardingSystem_Storage.Settings.businessClassID local fcID = game.ReplicatedStorage.exaBoardingSystem_Storage.Settings.firstClassID local PlayerOwnsAsset = MarketplaceService.PlayerOwnsAsset wait(1) -- Business Class Check Players.PlayerAdded:Connect(function (player) local success, doesPlayerOwnAsset = pcall(PlayerOwnsAsset, MarketplaceService, player, bcID.Value) if doesPlayerOwnAsset then bcValue.Value = true else bcValue.Value = false end end)
If someone can help me, I’d really appractice that.