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!
You should be changing the players PlayerGui
not 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