Ok so basically this is a section of my script that is for a gamepass gui script. I want this to make a textlabel visible if they own the gamepass, but it's not becoming visible for me. I'm new to scripting so an explanation would be helpful too!
Here:
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player,productId) then
script.Parent.Selectable = false
script.Parent.Text = '--'
script.Parent.Parent.Owned.Visible = true
else script.Parent.Parent.Owned.Visible = false
end
Thank you, Amsupr

1 comment
Only serverscripts can check if a user owns an asset. Only a localscript can change gui. Use a remote event and your problem should be fixed.