Hi guys I've been busy with this problem almost all day I try that when people buy the gamepass they get the VIP Gui over they're head but there was no error in the output and it does not work(I put my BillboardGui in ServerStorage) maybe you can solve it this is the code: ~~~~~~~~~~~~~~~~~ local billboardgui = game:GetService("ServerStorage"):WaitForChild("BillboardGui")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character) if game:GetService("MarketplaceService"):PlayerOwnsAsset(player,4785721) then local clonedgui = billboardgui:Clone() clonedgui.TextLabel.Text = "VIP" clonedgui.TextLabel.TextColor3 = Color3.fromRGB(239,184,56) clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head end end)
end) ~~~~~~~~~~~~~~~~~ Sorry about the lua I just signed in!
MarketplaceService:PlayerOwnsAsset()
to check if a player owns a game pass. You should be using UserOwnsGamePassAsync
.local market = game:GetService"MarketplaceService" game:GetService("Players").PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) if market:UserOwnsGamePassAsync(plr.UserId, 4785721) then end end) end)