--In a seperate server script, you will fire the remote event when the player buys the VIP
local MPS = game:GetService("MarketplaceService")
local ID = 8272545
local remote = game.ReplicatedStorage.VipDoorFire --name that properly
local button = script.Parent --name that properly
button.Touched:Connect(function(player) --the part that hit
MPS:PromptGamePassPurchase(player, ID)
MPS.PromptGamePassPurchaseFinished:Connect(function(player, gamepassId, purchased)
if gamepassId == ID and purchased then
remote:FireClient(player)
end
end)
end)
It is a script inside the gamepass door
Error here: MarketplaceService:PromptGamePassPurchase() player should be of type Player, but is of type Part - Server - Script:9
