OUTPUT
13:00:14.546 - Unable to cast value to Object
13:00:14.546 - Script 'Players.brickgame191.PlayerGui.Script', Line 3
13:00:14.546 - Stack End
heres the script :
local G1 = (IDhidden) if game:GetService("MarketplaceService"):PlayerOwnsAsset(script.Parent.Parent.userId, G1) then script.Parent:WaitForChild("SreenGui").GShop.G1.Check.Visible = true end
Whats the problem? D:
PlayerOwnsAsset
takes the Player, not their userId, as the first argument. Simply remove the .userId
bit from line 3.
What this error means is that you are attempting to take some data (I.e. a Number or a String) and use it in place of a ROBLOX Object (I.e. a Player or a Part), which doesn't work.