I'm trying to make a game that is like Find The Button where you go around a map and press a button to go onto the next stage but I'm trying to make it when you buy a Developer product then it reveals where the button is?
COMMUNITY QUESTION
How do I make a Reveal hint button in my Find The Button game?
2 answers
This should work:
local productId = --Insert Product ID Here
local BuyProductBtn = --Insert The Location Of The Button You Click To Buy This Product
local function RevealPass(player)
game:GetService("MarketplaceService"):PromptProductPurchase(player,productId)
end
BuyProductBtn.MouseButton1Click:Connect(function(RevealPass)
Hope this helps! Leave a comment if it doesn't and I will try to fix it.
2 comments
0
oops i forgot to say but you need to put this script in every different button because there are seperate buttons unless you make a script so when you buy it depending on what stage you are on it will show you a certain hint.
0
Can you show me an example roblox studio?
local script:
local mps = game:GetService("MarketPlaceService")
script.Parent.MouseButton1Click:Connect(function()
mps:PromptPurchase(game.Players.LocalPlayer, Id)--set Id to your product id
end)
server script:
function process(info)
local playerId = info.PlayerId
local players = game:GetPlayers()
local player
for i = 1, #players do
if players[i].UserId == playerId then
player = players[i]
end
local Id = info.AssetId
if Id == "Id" then --set the Id between the quotes to your product id
local beam = Instance.new("Beam", workspace)
beam.Attachment0 = player.Character.HumanoidRootPart
beam.Attachment1 = workspace.Button -- set this to the button name
end
end
local mps = game:GetService("MarketPlaceService")
mps.ProcessReceipt = process
Tell me if this works! It should create a beam that points towards the button for ease of finding.
2 comments
0
It says This item i not currently for sale. Your account has not been charged
0
Can you show me your edited code? You are supposed to change "Id" in both to your product id.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Name each button something like "Button1", 2, 3, etc. and whenever the dev product is purchased reveal it using their current stage. Something like "Button" .. stage.Value
Nice, you watch TheDevKing too?
Yes