On the wiki I noticed how most of the code for this method is in a localscript and I wanted to know if you could use it in a regular script for when players touch a part.
✓ ANSWER ACCEPTED
Is it Possible to use PromptProductPurchase in a Regular Script?
1 answer
✓ Accepted answer
I don't think so, however, you could add a local script to the players starterpack with the following code:
local part = game.Workspace:WaitForChild('Your Part')
local player = game.Players.LocalPlayer
local char = player:GetCharacter()
part.Touched:Connect(function(hit)
if hit.Parent.Name == char.Name then
add your prompt product purchase here.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Gotcha, thanks!
np