Billboard ui isnt clickable why?

im trying to make a screengui apear when the player clicks a billboard gui but it doesnt work

heres the code

script.Parent.MouseButton1Click:Connect(function()
	game.StarterGui.ScreenGui.Frame.Visible = true
end)

workspace for billboard gui
image

workspace for startergui
image

EDIT: I changed the name because I’m pretty sure it’s not the code that is the problem since when I click on my billboard UI it doesn’t register the click does anyone what the problem is?

1 Like

Try this:

Plr = game.Players.LocalPlayer

Frame = Plr.PlayerGui:WaitForChild("ScreenGui").Frame

script.Parent.Activated:Connect(function()
Frame.Visible = true
end)
1 Like

I am seeing 2 major problems here.

The first one is that you have a local script inside of your billboard gui. If it is in the workspace, then you cannot use a local script.

The second is that you are accessing the “ScreenGui” from StarterGui. Once you play the game, you can only change a gui if the script is inside of starter gui, or by accessing it via PlayerGui.

See if this will work (REMEMBER: This is in a Server Script, not a Local Script.)

script.Parent.Activated:Connect(function(plr)
   local Frame = plr.PlayerGui.ScreenGui.Frame
   Frame.Visible = true
end)
3 Likes

ill try these now thanks

i dont think that i can click the button even tho its an image button so im not sure if its the code

i made it so the image changes when you click it to see if i can click it and it didnt change

You cannot access the ScreenGui this way. Each player has a PlayerGui, the StarterGui is where you place GUIs that will be loaded into the PlayerGui when a player joins.

You have to do

script.Parent.MouseButton1Click:Connect(function()
player.PlayerGui.ScreenGui.Frame.Visible = true
end)

for some reason i cant click the billboard ui idk why

You can try to set your local script to a script where you set the RunContext to client and in your script put that :

local Players = game:GetService("Players")
local Player = Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()
	Player.PlayerGui.ScreenGui.Frame.Visible = true
end)
1 Like

but the problem is the clicks arent getting detected by the ui so i think thats why the code doesnt work

im not sure why its not getting detected tho

1 Like

Yes, because it is a local script !

ive been doing stuff so sorry for the late replies
but what im saying is that since your doing mousebutton1click and the ui cant even be clicked it wont work like its no the code that doesnt work you just cant even click the ui

1 Like

You need to put the same code but in a script not a local script that all !

i did and it still didnt work
i dont think you understand its not becouse its a local script or a normal script

the thing is it doesnt even count the clicks i changed the click image property and it still didnt do anything since it cant detect the clicks

You know, you can look into BillboardGui Here

My Stupid:

"BillboardGuis are containers for GuiObjects` that appear in the 3D space."

Not sure if that means if it Holds Gui, or it Shows Gui

hmmm i put a image button and it should work but idk thanks tho

Try this: script.Parent.MouseButton1Click:Connect(function() game.Players.LocalPlayer.ScreenGui.Frame.Visible = true end)

most people arent understanding my problem so let me clarify

the problem isnt the code its that th ui isnt clickable so my problem why cant i click the uli

Can’t you just use ProximityPrompt as a fake Clicker?

1 Like

hmmm i could but id rather it be a ui u click

i could maybe use a click detectotr but idk