GUI and Frame Issues

  1. What do you want to achieve? I have a donate GUI that opens up when you hit a brick. I have a button that when clicked down, will bring up a prompt to buy a developer product.

  2. What is the issue? The problem is that GUI has a Frame inside where the button resides, and it contradicts the way the script works. What’s the best way to change the script without deleting the Frame?

image

  1. What solutions have you tried so far? I can’t find anything that relates to my situation.

Can you explain bit more on what do you mean by this you can also just set transparency of Frame to 1 or set The Button Zindex higher than The Frames Zindex (that is 2 [If you didn’t change Frame Zindex]) usually works out

PromptProductPurchase’s first parameter should be a player instance (ie. game.Players.LocalPlayer). In your case it appears to be a ScreenGui.

local id = 1013277487
local button = script.Parent.Frame.TextButton -- change location of this button to suit your needs.

button.MouseButton1Click:connect(function()
	game.MarketplaceService:PromptProductPurchase(game.Players.LocalPlayer, id)
end)

I recommend the above because it means you could move the script and all you would have to do is change the location of the button.

(This question is quite confusing, if possible, try to elaborate more or check the sentences to make sure they are easy to read)

1 Like

Thank you for your help! Sorry for the confusing writing, I’ll try to elaborate more next time. :sweat_smile: