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)
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,