Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a BillboardGui ImageButton Open a ScreenGui's Frame?

Asked by 5 years ago

The script I tried:

function Clicked()
    script.Parent.Visible = false
    script.Parent.Parent.speechframe.Visible = true -- speechframe is the frame (the one in the screengui's) name.
end

script.Parent.TextButton.MouseButton1Click:connect(Clicked)

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
5 years ago

A serverscript wouldn't know which player clicked on the button. Here's a solution:

Put the BillboardGui inside of StarterGui (or playergui if you parent it later), and set the adornee (property) to the part you want it displayed on. You can then use a localscript to handle the click events.

Ad

Answer this question