OMG LOL I DIDN’T EVEN NOTICE THAT. Things like that have happened to me before, where I was sitting for like 20 minutes just to notice I forgot to make it change the value.
OH MY GOD. REAL LIFE LEGEND! Thank you so much you literally saved me. Great spot. <3
The fact that none of us noticed that and we all spammed different scripts to try and get it to work is just hilarious.
everytime the player dies it show up this screen. if you press continue it will prompt purchase
local Humanoid = Player.Character:WaitForChild('Humanoid')
local Main = script.Parent:WaitForChild('Main'):GetChildren()
local Id = 947365701
local MarketPlaceService = game:GetService('MarketplaceService')
Humanoid.Died:Connect(function()
if Player and Player.Character then
script.Parent.Parent:WaitForChild('DeathFrame').Visible = true
end
end)
for g = 1,#Main do
if Main[g]:IsA('TextButton') then
Main[g].MouseButton1Down:Connect(function()
if Main[g].Name == 'Continue' then
if Player and Id then
MarketPlaceService:PromptProductPurchase(Player, Id)
end
end
end)
end
end
Lol, that’s why I always check for typos in someone’s script when they say it’s not working.
For awareness, the lua engine does tell you when an unknown variable exists. It should inspect it with an orange line underneath it. If not then you can toggle this in File > Settings > Studio and change any colors you need.
I was a midst creating this when I saw someone noticed the spell check at the start. Anyway I created this for you which took me about 5 minutes but it has a VERY useful product handler which has helped me tons when creating products. You should only ever accept one receipt in your entire game though so if you do use this then replace your old one with it.
Have fun developing
Thanks So much for your help!