Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to use UserOwnsGamePassAsync?

So im trying to use this to make a nuke and its not working. Here is some of my code:

local Click = script.Parent.Click
local ClickDetect = Click.Detector
local NukePosParent = script.Parent.BIGNUKE
local mar = game:GetService("MarketplaceService")
local Num = 6089351

ClickDetect.MouseClick:connect(function(p)
	if mar:UserOwnsGamePassAsync(p, Num) then
		local Nuke = Instance.new("Part")
		Nuke.Parent = script.Parent
		Nuke.Position = NukePosParent.Position
		while true do
			Nuke.Size = Nuke.Size + Vector3.new(1,1,1)
			wait(.1)
		end
		else mar:PromptGamePassPurchase(p, Num)
	end
end)

1 answer

✓ Accepted answer

Use Player.UserId, not player.

2 comments

0

Lemme try that

0

This is going to do good!

This discussion is preserved as it was. New answers, comments, and votes are closed.