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

PlayerOwnsAsset is not a vaid member of MarketplaceService?

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

You mistyped :PlayerOwnAsset for :PlayerOwnsAsset

Use Find and Replace to quickly change them all.

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