This is what I tryed.
function OnPurchased(2312) then game.workspace.DPDoor.cancollide = false end end
(Sorry if I am a scripting noob)
This is off by quite a bit. There's a wiki article on developer products but it fried my brain first time I tried to learn it. I would go back to basics, start by taking free model scripts then trying to figure out how they work using the wiki to explain methods you don't understand.
It should be
script.Parent.Touched:connect(function (hit) game:GetService("NAME"):PromptProductPurchase(player,ID) end end)
But in that, you should change things around w/ your script, because if you do mine, it won't work for yours.