I created this script but it doesn't work, it's a VIP door. Don't know what I'm doing wrong but any and all help would be greatly appreciated, thanks. This is in a regular script inside a block.
local ID = 1369781260
plr = game.Players.LocalPlayer
debounce=false
function onTouched(hit)
if debounce==true then return end
debounce=true
game:GetService("MarketplaceService"):PromptPurchase(plr, ID)
debounce=false
end
script.Parent.Touched:connect(onTouched)

8 comments
Is there a error in the logs?
No
Then I can not help you
Well thanks man. You sure tried.
I found out using print commands it doesn't get passed this command.... game:GetService("MarketplaceService"):PromptPurchase(plr, ID)
15:03:25.054 - MarketplaceService:PromptPurchase() player should be of type Player, but is of type nil. -----Tat's the error.
You cannot use LocalPlayer in a regular script.
I put it all in a local script and now it doesn't work at all