Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago
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

Log in to vote
-1
Answered by
green271 635 Moderation Voter
5 years ago

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.

0
But if i using a t-shirt then?' Lava_Scripter 109 — 5y
0
It’s UserOwnsGamePassAsync, not UserOwnsGamepassAsync. User#19524 175 — 5y
Ad

Answer this question