local id = 8672917 local player = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, id) then
script.Parent.Visible = true
else script.Parent.Visible = false end
it wont work whats wrong ?
local id = 8672917 local player = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, id) then
script.Parent.Visible = true
else script.Parent.Visible = false end
it wont work whats wrong ?
Simple mistake! Here, I fixed it:
local id = 8672917
local player = game.Players.LocalPlayer
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then -- It should be UserOwnsGamePassAsync() for Game Passes, and it requires the players UserId
script.Parent.Visible = true
else
script.Parent.Visible = false
end
Be sure to accept this answer if this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
thanks