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.
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.