I’m trying to make it so there’s a purchase prompt on the players screen when the proximity prompt triggers, but for some reason it wont work and the first line of the function wont print. I tried pathing the player different ways but nothing is happening. This is the code.
local proximity = script.Parent.ProximityPrompt
local MarketplaceService = game:GetService("MarketplaceService")
local Players = game:GetService("Players")
local player = Players:GetPlayerByUserId(game.Players.LocalPlayer.UserId)
local productId = 13600173502
local function promptpass()
print("Prompting Purchase")
MarketplaceService:PromptProductPurchase(player, productId)
end
proximity.Triggered:Connect(promptpass)