✓ Accepted answer
Hi, i'm BashGuy10. Hopefully i can help you!
Problem?
You don't know how to make a brick prompt you to buy a gamepass?
Fixes
It's really simple, just do :PromptGamePassPurchase(plr, gamepassid)
.
Also if it doesn't work use :PromptGamePassPurchase(gamepassid, plr)
Some info: plr, is the player instance. gamepassid is the string of numbers found in the URL for the gamepass.
Here are some link to help you out:
:PromptGamePassPurchase(plr, gamepassid)
MarketplaceService
Example Fix
By the way, this is a server script. k
local gamepassid = 0
script.Parent.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
end)
1 comment
You could use the Touched event of the brick to prompt it, something like part.Touched:Connect(function(hit) local player = game:GetService(“Players”):GetPlayerFromCharacter(hit.Parent) end) And just prompt the player found from it to buy the gp.