-
What do you want to achieve?
I’m trying to make a button that does something if a player touches it and owns a gamepass. -
What is the issue?
The issue is that when I test it out, nothing happens and it says “Userid is not a valid member of MeshPart” -
What solutions have you tried so far?
I tried to figure it out on my own, but I ended up looking for a solution on the Developer Forum. However, I still couldn’t find anything that worked.
Here is what I have right now:
script.Parent.Touched:Connect(function(player)
local PlayerBoughtThisGamePass = MarketPlaceService:UserOwnsGamePassAsync(player.Userid, 10981103)
if PlayerBoughtThisGamePass then
script.Parent:Destroy()
end
end)