Frame2 = game.StarterGui.ScreenGui.Frame
Button = script.Parent
function onClick()
Frame2.Visible = true
end
Button.MouseButton1Click:connect(onClick)
What is wrong!?
Frame2 = game.StarterGui.ScreenGui.Frame
Button = script.Parent
function onClick()
Frame2.Visible = true
end
Button.MouseButton1Click:connect(onClick)
What is wrong!?
StarterGui is where you put GUI's that will replicate to the player's PlayerGui. You edit the GUI in PlayerGui to display any changes instantly.
-- LocalScript in the ScreenGui
local plr = game.Players.LocalPlayer
--You may need to fix these
local Frame2 = script.Parent:WaitForChild("Frame")
local Button = Frame2:WaitForChild("TextButton")
function onClick()
if Frame2.Visible then
Frame2.Visible = false
else
Frame2.Visible = false
end
end
Button.MouseButton1Click:connect(onClick)
Several Things that might brake the script...
I am not positive, but "MouseButton1Click" may be wrong. Even if it is technically correct, try something like MouseButton1Down
Try messing around when the arguments in the function. A variable might not be carrying over
Hope this helps!
This discussion is preserved as it was. New answers, comments, and votes are closed.