I have a Gui button when pressed it fires a remote event that is connected to a server script that prompts a game pass purchase:
In the local script inside the Gui button:
local RStorage = game:GetService("ReplicatedStorage")
local Event = RStorage:WaitForChild("RE1")
local Button = script.Parent
Button.Activated:Connect(function()
print("Event Fired")
Event:FireServer()
end)
and in the server script inside the ServerScriptService:
local GamePassService = game:GetService("GamePassService")
local RStorage = game:GetService("ReplicatedStorage")
local Event = RStorage:WaitForChild("RE1")
local MarketplaceS = game:GetService("MarketplaceService")
Event.OnServerEvent:Connect(function(player)
MarketplaceS:PromptGamePassPurchase('6693488')
print("All thisnss")
end)
and the error it gives.:
Event Fired
16:27:07.628 - Argument 2 missing or nil
16:27:07.631 - Stack Begin
16:27:07.633 - Script 'ServerScriptService.ServerSideGP:VIP', Line 7
16:27:07.635 - Stack End
--I dont know if this has to do anything:
16:25:16.767 - Go to Game Settings and turn on Allow HTTP requests.
Can someone fin the error and tell me it?

1 comment
So it looks like you need to enable HTTP requests. You can enable that in game settings. Also in PromptGamePassPurchase() it needs to be: PromptGamePassPurchase(player, [GamePassID])