I am trying to make a button that can only be pressed by a person with a specific gamepass, but everything I try wont work. Can someone help me fix my scripts?
COMMUNITY QUESTION
Need help making a button that can only be pressed by someone with a gamepass?
1 answer
You can check if they have the gamepass like this:
local id = --gamepass id
script.Parent.MouseClick:connect(function(player)
if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,id) then
-- whatever you want to do here
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
