Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it Possible to use PromptProductPurchase in a Regular Script?

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.

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.

2 comments

0

Gotcha, thanks!

0

np

This discussion is preserved as it was. New answers, comments, and votes are closed.