BillboardGUI Text Button doesn't change screengui.enabled to true when clicked on

  1. What do you want to achieve? I want when I press a billboard gui text button to set screengui.enabled = true

  2. What is the issue? No errors but still nothing appears. I got a frame inside screengui that is visible too but still nothing. Also when I press on the button the billboardgui frame visible is set to false and it works just fine.

  3. What solutions have you tried so far? I looked for solutions but not any information on this thing.

This is a local script that is put in the text button! If you have any solution for this it would be perfect!

local dialoggui = game.Players.LocalPlayer.PlayerGui:WaitForChild("DialogGui")

script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
	game.Players.LocalPlayer.PlayerGui.BillboardGui.Frame.Visible = false
	dialoggui.Enabled = true
end)

Do you have a BillboardGui inside the StarterGui folder? I noticed your script said:

game.Players.LocalPlayer.PlayerGui.BillboardGui.Frame.Visible = false

Yeah I do have it in the startergui folder

It seems like the issue might be with the path to the BillboardGui or Frame. Double-check that the path is correct and that the Frame is a child of the Screengui you are trying to enable. You can also try printing out the values of game.Players.LocalPlayer.PlayerGui.BillboardGui and dialoggui to see if they are what you expect them to be.

Also, make sure that the TextButton is actually a child of the BillboardGui, otherwise script.Parent.Parent might not be pointing to the correct object.

If the path is correct and the Frame is a child of dialoggui, you could try enabling the Screengui and then setting the Frame visible. For example:

local dialoggui = game.Players.LocalPlayer.PlayerGui:WaitForChild("DialogGui")

script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
    dialoggui.Enabled = true
    dialoggui.Frame.Visible = true
    game.Players.LocalPlayer.PlayerGui.BillboardGui.Frame.Visible = false
end)

This should first enable the Screengui, then make the Frame visible, and finally hide the Frame in the BillboardGui.

Change it for a ScreenGui, and try it again.

He said no errors appeared tho, that means that the path is correct.

Now it says frame is not a valid member of screengui with your script

local dialogGui = game.Players.LocalPlayer.PlayerGui:WaitForChild("DialogGui")

script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
	game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.Visible = false
	dialogGui.Enabled = true
end)

Maybe try this? We don’t really have much context. And make sure the BillboardGui is changed for a ScreenGui.

BillboardGui’s are usually used in parts not in player objects.

I get an error from this too so it doesn’t work

screenshotscript
This is how they look

What did the error say? (minumum characters)

screengui is not a valid member of playergui

Change the BillboardGui for a ScreenGui to get rid of the error

BillboardGuis are not meant to be used inside StarterGui, but rather parts.

Yeah but I made it a billboard gui so I can put it on a part and interact with it

Try putting it on a part and inside the StarterPlayerScripts make a script and link it to the buttons.

I put it in a part and now if i try to press a text button it doesnt work at all to press thats why I put it on the screengui because it was working there

Did you try linking a LocalScript from StarterPlayerScripts to the BillboardGui?

Its not a problem of any script its just that when you put your mouse over the textbutton it doesnt detect the textbutton


Basically here what I have is multiple choices of dialog and when I press a button I want the startergui to be enabled and on the screen the answer of the npc but the screengui doesn’t get enabled from some reason and I can’t figure it out and I don’t have any errors too.

1 Like