Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I want to make a GUI that appears when I click on a brick. How can I do this ?

Hello just i sad in the title I want to make a GUI that appears when I click on a brick. The Script I made dont work

function onClicked()
game.StarterGui.Gamepasses.BalloonGUI.Frame.Visible = true
end 

script.Parent.MouseClick:connect(onClicked)

I putted a Script in the ClickDetector and the ClickDetector in the Brick Thanks for your help.

1 answer

✓ Accepted answer

you are modifying the StarterGui, everything thats inside the startergui gets cloned into the PlayerGui of a player so if you modify something in StarterGui it will only show after the players dies so if you want the modify it instantly you have to modify the PlayerGui

the PlayerGui is part of the player. like this Player.PlayerGui

see PlayerGui vs StarterGui

4 comments

0

but how can I implement that in the script

0

the clickdectocter returns the player as parameter, so all you have to player.PlayerGui.Gamepasses.BalloonGUI.Frame.Visible = true

0

ok thanks it works now :)

0

Np, glad i could help

This discussion is preserved as it was. New answers, comments, and votes are closed.