Can't find any information on it
So if you want to make a frame goes to invisible and visible in a textbutton. There is the script:
local button = script.Parent local frame = script.Parent.Parent.Frame button.MouseButton1Click:Connect(function() if frame.Visible == true then frame.Visible = false elseif frame.Visible == false then frame.Visible = true end end)
You do it as if you would do it in a normal script, just from a local one.
If there's something on the server to make the gui pop up, you use remote events.
Anyway, the question is really vague, can you please be more specific?
If you are looking to make GUI objects such as TextButtons or Frames invisible then you would do -
local frame = Instance.new("Frame") frame.Visible = false -- or true
If you are looking to turn the ScreenGui
object invisible - which includes everything inside it, you would do -
local gui = Instance.new("ScreenGui") gui.Enabled = false -- or true
If you are looking to Enable / Make them visible from the Server Side, then you would need to fire a RemoteEvent
to either all clients or a singular client. That client would have a Local Script
inside of it, which would be triggered when the RemoteEvent
is fired and set the client's GUI to enabled or visible.
https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events
More specific huh?
I have a script which should make a gui go invisible. It doesn't. It doesn't even copy the Camera script. It used to work, but now it doesn't. Everything else works apart from the gui parts and the camera script copying. Here you go:
train = game.ReplicatedStorage.C153 Camera = workspace.CurrentCamera game.ReplicatedStorage.C153Spawn.OnServerEvent:connect(function(player) print("Event Received") player.PlayerGui.MainMenuGui.Screen.DriveFrame.Visible = false player.PlayerGui.MainMenuGui.Screen.Spawning.Visible = true player.PlayerGui.MainMenuGui.Screen.Spawning.Text = "Spawning..." wait(0.01) local clone = train:clone() clone.Parent = workspace clone:MakeJoints() clone.Bogies.SD_Bogie:MakeJoints() clone.Bogies.SD_Bogie2:MakeJoints() wait(1) player.Character.HumanoidRootPart.CFrame = CFrame.new(-2449.474, 10.174, -198.335) player.PlayerGui.MainMenuGui.Screen.Spawning.Visible = false player.PlayerGui.MainMenuGui.Screen.IntroMusic:Stop() script.Parent.CameraFix:clone().Parent = player.Character end)
Closed as Not Constructive by climethestair, User#22219, Vulkarin, and User#21908
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?