Buzzy

Register

Roblox Studio Tutorials - August 6, 2021

How to Make a Donation Button

1

Buzzy Beth

@buzzygamesbeth

Download – Donation Button Script

  • i’m going to show you how you can make a donation button in roblox studio
  • the first thing i’ve done is get a part made it green and scaled it
  • up next i’m going to add two things a click detector and a script
  • so i’ve gotten rid of the print statement and i’m going to get a couple more variables first one is going to be a reference to the script parent, the button that we’re on and the clickdetector which is what we’re going to use to detect when somebody has clicked our part
  • so i’ve jumped ahead a little bit here i made a new local function called donate passing a player as a parameter and now i got in the marketplace service
  • once i have the marketplace service i’m going to do colon promptproduct purchase and now that i’ve done that i’m going to add another variable
  • this variable is going to be our productid i’m going to show you how to get theproductID in just a second
  • so i’m going to do product id i’m going to set that to 0 for right now and then at the end here i’m going to do a part excuse me cddot mouse click oh and then colon connect and then we’re going to do donate all
  • right i’ll be right back showing you how to get the product id and make a developer product
  • so here i am in the developer products i got here because i went to configure game from the game menu and then i went down to developer products i’m going to create new and call this donation for my game
  • just give it a description whatever you want i’m going to make it 10 robux you can choose an image if you want and i’m going to create all right
  • so now i have this number so copy that number that you see there and i will join you back in roblox
  • now back in roblox studio i’m going togo to the productID make sure that double check make sure see i missed a four so double check make sure that is right and then i’m going to do player comma productID and then we are ready to test!