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

Help with this script and its A Gui Script and the output says nothing?

script.Parent.MouseButton1Click:connect(function(Player)
	if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 1857769473) then
	local Bus = script.Parent.Parent.Parent.Folder["Busniess Class"]:Clone()
	Bus.Parent = game.Players.LocalPlayer.Backpack
	local Class = game.Players.LocalPlayer.PlayerGui.SelfCheckIn.Class
	local Bag = game.Players.LocalPlayer.PlayerGui.SelfCheckIn.Bag
	Class:TweenPosition(UDim2.new(0.305,0,-2,0), "Out", "Bounce", 3)
	wait(1)
	Bag:TweenPosition(UDim2.new(0.305,0,0.258,0), "Out", "Bounce", 3)
	else
		script.Parent.Parent.Dont.Visible = true
		wait(1.5)
		script.Parent.Parent.Dont.Visible = false
	end
end)

1 answer

You should be using UserOwnsGamepassAsync instead of PlayerOwnsAsset.

Example:

On line 2 - if game:GetService("MarketplaceService"):UserOwnsGamepassAsync(Player.UserId, gamepassId) then

Also note that the previous id will NOT work, you need to get the new id due to the change. Go to your inventory and find the gamepass.

2 comments

0

But if i using a t-shirt then?'

0

It’s UserOwnsGamePassAsync, not UserOwnsGamepassAsync.

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