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

GUI appearing help?

script.Parent.MouseButton1Click:connect(function(onClicked) script.Parent.BackgroundColor3 = Color3.new(254/255, 0/255, 4/255) wait (2) script.Parent.BackgroundColor3 = Color3.new(67/255, 207/255, 42/255) end)

script.Parent.MouseButton1Click:connect(function() game.StarterGui.ScreenGui.Help.Visible = true end)

This is all in one script. When a player clicks the textbutton on the gui, another frame should become visible and the button should change colors to signify a click. The color change works, but not the visibility. I think the problem lies in this line "game.StarterGui.ScreenGui.Help.Visible = true" I don't know how to use the parent and child properly though so that is why I request help. Thanks in advance!

1 answer

You should be changing the players PlayerGuinot their StarterGui

StarterGui is the Gui Players see when they respawn, used for making class loadouts on games like Call of Robloxia PlayerGui is what the Gui that players see currently, used for making things that change a Gui, such as when you click a button a new Gui pops up, or you touch a brick and a Gui pops up. These examples aint spot on, but it may be helpful.

script.Parent.MouseButton1Click:connect(function(onClicked)
script.Parent.BackgroundColor3 = Color3.new(254/255,0/255,4/255)
wait(2)
script.Parent.BackgroundColor3 = Color3.new(67/255,207/255,42/255)

script.Parent.Parent.Parent.ScreenGui.Help.Visible = true-- Assuming this is in a script inside of the Gui's Button
end)

Any questions or concerns? Is it not working? Just leave a comment, I will answer hopefully as soon as I can.

Note: Please use Code Blocks to make your code readable

Edit: Hopefully fixed it, I messed up on some .Parent and the location of the .Help

8 comments

0

It still isn't working. I checked the parent and childs, and they all lead to where they should. What is wrong with this?

0

To clarify: StarterGui is just a container that you put your GUI objects in. When a player spawns, the items in StarterGui are copied and pasted into a PlayerGui container that is inside the Player object.

0

And yeah, Merely gave a good example of the two Gui's. Also wanted I will look more into it

0

@Wanted I edited it, I messed up on the .Parent's I believe. Also the script I used is all assuming this script is inside of a textButton inside of a Gui

0

It still didn't work for me. The tree is: Script, Textbutton, frame, Screengui. There are two frames in the same screengui, one to summon the help with, the other to be summoned.

0

Can you take a picture of it and show me? That would make this easier to understand. I know the script is right, just the .Parent's and locations on the script is off

0

Thanks dude, I just had to add an extra parent.

0

There you go, no problem.

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