Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited 4 years ago

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)

0
Could you please show us the code? We can't help if we can't see. Gokhaii 58 — 4y
0
I edited it for the code. BlazeGoes 2 — 4y

1 answer

Log in to vote
0
Answered by
Gokhaii 58
4 years ago

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,

Ad

Answer this question