GUI Support Needed

  1. What I want to acheive.
    All of the buttons to function as intended.

  2. What is the issue?
    The bullet point sets off when launching the game.
    image

These are my buttons, values, and scripts. The values correspond to the drink selected, e.g FW is Flat White. The Next button is Next. The Text Buttons are the invisible ones in the backround. And the Bullet’s are the images as if someone pressed the drink they want, the bullet highlights, for example I want a Flat White, bullet FW makes itself visible.

This is my GUI it is a image GUI with transparent buttons to make it work.

Here is my code.

local FlatWhiteGUI = script.Parent.FlatWhite
local AmericanoGUI = script.Parent.Americano
local CappucinoGUI = script.Parent.Cappuccino
local EspressoGUI = script.Parent.Espresso
local CaffeLatteGUI = script.Parent.CaffeLatte
local MacchiatoGUI = script.Parent.Macchiato

	function FlatWhite()
		script.Parent.FW.Value = true
		script.Parent.None.Value = false
		script.Parent.AM.Value = false
		script.Parent.MA.Value = false
		script.Parent.ES.Value = false
		script.Parent.CA.Value = false
		script.Parent.CL.Value = false
		script.Parent.BulletFW.Visible = true
            script.Parent.BulletCA.Visible = false
	    script.Parent.BulletAM.Visible = false
	    script.Parent.BulletMA.Visible = false
	    script.Parent.BulletCL.Visible = false
	    script.Parent.BulletES.Visible = false
	    end

	FlatWhiteGUI.MouseButton1Click:Connect(FlatWhite())

When you call :Connect() on an event, you dont call the function you are passing, instead of

FlatWhiteGUI.MouseButton1Click:Connect(FlatWhite())

it should be:

FlatWhiteGUI.MouseButton1Click:Connect(FlatWhite)
1 Like

I’ll try this, thanks for suggesting.

Most likely, I really don’t know.

It’s worked, thank you so much!

Do you think you can help me give the tool to the player now?

With the boolvalues I’ve assigned each one, and they should be checked if the player has selected the specific drink. What I want to do with this data is give the tools on this payment screen, as soon as this GUI appears.