I have been having issues when I click the button that the frame does not pop up any way I change the code I need help, here is the code.
script.Parent.MouseButton1Click:Connect(function() game.StarterGui.ToolGui.ToolFrameGui.Visible = true end)
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Parent.Parent.Parent.PlayerGui.ToolGui.ToolFrameGui.Visible = true end)
It seems that you are a beginner. I will explain what StarterGui, StarterPlayerScripts & what StarterCharacter is for. They are for putting things inside, that the core scripts of roblox will automatically put their contents inside of a player when they joined, for example if a player joins, and you have a gui inside of StarterGui, the roblox corescripts will clone the gui, and set the cloned gui's parent to the new player's playergui. Here is your fixed code, assuming your script is inside of the clickdetector object which is inside of your part:
script.Parent.MouseClick:Connect(function(player) player.PlayerGui.ToolGui.ToolFrameGui.Visible = true end)
OR if you are making a gui pop up from a textbutton, here is your code, assuming that your textbutton is located inside of a frame which is inside of a screengui:
script.Parent.MouseButton1Click:Connect(function() script.Parent.Parent.Parent.Parent.ToolGui.ToolFrameGui.Visible = true end)
Happy to help, if you have any other questions feel free to add me on Discord: Haunted#5196