Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Frame and Gui Toggle wont show? I have tried the visibility button multiple times.

I followed a tutorial for the code, and the visibility button wont work, also i am a very new person to coding on Roblox/Lua, so please take it easy on me and explain it briefly, also i placed the GuiToggle Frame and Localscript into starterplayers, i went on a twitch stream to get help and he told me to place it there.

local frame = script.Parent.Frame script.Parent.Toggle.

MouseButton1Click:Connect(function()

if frame.Visible == true then

frame.Visible = false

else

frame.Visible = true

end

end)

2 comments

0

Could you please show us the code? We can't help if we can't see.

0

I edited it for the code.

1 answer

✓ Accepted answer

First of all, make sure that "script.Parent.Toggle" is a TextButton / ImageButton otherwise this will not work. Next, make sure that it is a local script. The script works fine since I just tested it, so it must be the placement of your frame / textbutton.

Make sure the frame and text button are inside of a ScreenGui which is inside of the StarterGui. Name the frame and text button accordingly to what the script says to be as accurate as you can. Also make sure that you place the local script inside the ScreenGui that you created.

StarterGui is the place for all your frames to go, so it is not recommended to put a frame into StarterPlayers.

Hope this helps,

This discussion is preserved as it was. New answers, comments, and votes are closed.