Why are arguments not required here?

I have found this code in the Roblox developer library regarding game passes, however I have a question on functions here. In this line of code: MarketplaceService.PromptGamePassPurchaseFinished:Connect(onPromptGamePassPurchaseFinished) why is it not :Connect(onPromptGamePassPurchaseFinished(Argument, Argument, Argument))?? If the function requires arguments, why do none have to be provided? Or do they and I have misunderstood?
Thanks

local function onPromptGamePassPurchaseFinished(player, purchasedPassID, purchaseSuccess)

	if purchaseSuccess == true and purchasedPassID == gamePassID then
		print(player.Name .. " purchased the game pass with ID " .. gamePassID)
		-- Assign this player the ability or bonus related to the game pass
		--
	end
end

-- Connect "PromptGamePassPurchaseFinished" events to the "onPromptGamePassPurchaseFinished()" function
MarketplaceService.PromptGamePassPurchaseFinished:Connect(onPromptGamePassPurchaseFinished)```
1 Like

The parameters that come with PromptGamePassPurchaseFinished just get passed through to the name of the function provided. Thus, it’s not necessary to add parentheses and the parameter names.

1 Like