Billboard gui button not opening up screen gui

I’ve been trying to make it so that when I press a billboard gui button, it’ll open up another gui.

Unfortunately it doesn’t seem to work, because whenever I press it, it just doesn’t work at all. I’ve already concluded that the button press itself seems to be fine. As it works perfectly with print statements, although it refuses to work with Gui’s it seems

I’ve tried moving the local script to all different areas like starterplayer scripts and stuff. As well as trying to change the location it’s looking for into playergui rather than startergui. Although nothing seems to work.

If it’s in anyway helpful here’s some screenshots of the files it’s inside.

local Player = game.Players.LocalPlayer
local Frame = Player.PlayerGui.ScreenGui.Frame
local Click = Player.PlayerGui.BillboardGui.ImageButton

if (plr == Player) then
Frame.Visible = not Frame.Visible

Nevermind, I just removed the if player thing and it just worked.

Make sure your Billboard GUI’s Adornee property is set to whatever part you want it to hover over.

Also, you don’t need that if statement checking to see if the player that clicked the TextButton is the LocalPlayer because since this LocalScript is in StarterGui, it will be replicated to every client in the game and it won’t detect actions of other players like mouse clicks on a text button since it’s a LocalScript.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.