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

PlayerOwnsAsset is not a vaid member of MarketplaceService?

Asked by 8 years ago
Edited 8 years ago

At the top of the script I have this:

local GPS = game:GetService("MarketplaceService")

And at the bottom:

                    if c.Vip_Suit.VipType.Value == 1 and GPS:PlayerOwnAsset(p, script.Parent.Rex.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end 

if c.Vip_Suit.VipType.Value == 2 and GPS:PlayerOwnAsset(p, script.Parent.Sat.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end 

if c.Vip_Suit.VipType.Value == 3 and GPS:PlayerOwnAsset(p, script.Parent.Fusion.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end 

if c.Vip_Suit.VipType.Value == 4 and GPS:PlayerOwnAsset(p, script.Parent.Rex.Value) and GPS:PlayerOwnAsset(p, script.Parent.Sat.Value) then
for _,v in pairs(game.ReplicatedStorage.Game_Tools[c.Vip_Suit.Tool.Value]:GetChildren()) do
if v:IsA("HopperBin") or v:IsA("Tool") then
v:clone().Parent = p.Backpack
end end end

Not sure what should be changed if it's checking if the player owns the asset located in the value at the bottom ?_?

1 answer

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
8 years ago

You mistyped :PlayerOwnAsset for :PlayerOwnsAsset

Use Find and Replace to quickly change them all.

Ad

Answer this question