MouseButton1Click doesn't return a player object.
If this is a localscript, you can do game.Players.LocalPlayer
local GamePassService = game:GetService('GamePassService')
local CatGamepass = 26348478
local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
if GamePassService:PlayerHasPass(player, CatGamepass, true) then
player.leaderstats.FaceValue.Value = "Uwu"
else
game:GetService("MarketplaceService"):PromptPurchase(player, CatGamepass)
end
end)
Btw, since I don't really know about marketplaceservice, IDK if the argument is correct.
the only thing I see is that you put an invalid argument for the player part
also, please use the code block feature next time..
5 comments
I think the the markeplace service
@Asta_TheDenomic wdym? Did you tried the script?
yes
ty it works
You can accept the answer by pressing a button under..