while script.Parent.BrickColor == ("Medium stone grey") do
wait(1)
end
script.Parent.ClickDetector.MouseClick:connect(function(player)
game:GetService("MarketplaceService"):PromptPurchase(player,155809520)
end)
Basically what it's supposed to do is keep looping until it is no longer the color "Medium stone grey" and then move onto the next portion of the code (prompt purchase the player when clicked)
The issue is, when I tested it, I clicked it while it was still medium stone grey and it prompt purchased me. Please help. What did I do wrong?
|