Hello I am doing a work Local script let me explain. This script will make you press a text button and then a gui pops up. This is what I got so far
wait(6) game.Workspace.building.kepiblopsworkdesk["kepiblop's computer"].Screen.SurfaceGui.Frame.TextButton.MouseButton1Down:Connect(function() --Button that they click local player = game.Players.LocalPlayer local gui = game.Workspace.building.kepiblopsworkdesk["kepiblop's computer"].Screen.kepibloppc --Computer gui local guiclone = gui:Clone() guiclone.Parent = player:WaitForChild('PlayerGui') gui.Enabled = true if gui.Parent == nil then warn("Player hasn't gotten the gui yet") else print("gui given!") end end)
I am not using variables for long ones because i really wanted to give my fingers a workout It may not look clean so i will put comments on what they are! I know what you're thinking Where's the problem and what is the problem? Well believe it or not it actually works problem is it doesn't pop up and it just stays there Here's what I can confirm
The Local script works
The local script is in ReplicatedFirst
All frames are visible except for the unnecessary ones
The problem is that the gui does not become visible but it does execute and it does go there
Hopefully I got everything important and clear Thanks!
Make sure the local script
is in StarterGui
and then simply follow this script
local button = script.Parent --Declare button local ui = script.Parent --Delcare UI/Frame local debounce = false button.MouseButton1Click:Connect(function() if debounce == false then debounce = true ui.Enabled = true -- or if it is a frame ui.Visible = true else if debounce == true then debounce = false ui.Enabled = false -- or if it is a frame ui.Visible = false end end)
Make sure your UI or Frame .Visible/Enabled is set to false.
I also personally think variables are more easier as it shows where the error is if wrong.