The game pass prompt doesn't work

So recently, I was attempting to make a button on my GUI open a prompt to sell a game pass. The GUIs all work normally, though the prompt doesn’t show up. I got the script from a YT tutorial and changed the referencing as needed. Here is some more details:

Script I used:

Output says that “mosuebutton1click is not a valid member of Imagelabel” though I’m pretty sure this should work… If you have any solutions please let me know!

Screen Shot 2020-11-11 at 4.27.56 PM

Could you please add more part of the script?
Seems like you’re trying to get a MouseButtonClick from a Image and not from a Button

It is from an image button.

Also that is the entire script lol.

You need to change the ImageLabel to be an ImageButton

MouseButton1Click in not a function of ImageLabel

Screen Shot 2020-11-11 at 4.40.24 PM

I’m pretty sure it is a button…-

MouseButton1Down is not an event for ImageLabel. You would have to use an ImageButton in order for this to work.

image
I’m pretty sure it’s not a button, considering this is the error

You’re probably referencing the Gamepass2 ImageLabel, not the button inside it

2 Likes

I did reference the button inside

“VipGamepass” is a button.
Screen Shot 2020-11-11 at 4.43.00 PM

Just noticed, that error is from an entirely different script

2 Likes

Well. LOL. Either way, the prompt isn’t working, which it should because that is the purpose of this script.

There is an error, that’s why I came over here to the forum.

Is the entire script aiming to player.localplayer.starterGUI?
Sometimes you don’t get the output because you referenced Game.StarterGUI instead of the playerGUI

Well then the problem is still that you’re trying to get a MouseButton1Down event from an ImageLabel, even though that isn’t an event for ImageLabel’s. Swap out that ImageLabel for an ImageButton and it should work.

1 Like

I’ll try that. Give me a moment lol.

1 Like

I marked it as solution accidentally, lol. That didn’t work.

Do you still get an error from using an ImageButton?

Wait, no… I’m going into a test server to see if it works.

Anyway my mac is really slow so it will take me a while.

Don’t worry, take your time with it.

Screen Shot 2020-11-11 at 5.29.01 PM

Half works? This is an easy fix, just turning on “allow http requests”, but the gamepass is on this game. Really doesn’t make sense, but it’s at least working lol.