(its my first few days of scripting)
So im really embarrassed that I don’t know how to do this yet… but I’ve been coding on my computer straight for 12 hours and I’ve browsed so many areas but I can’t seem to even find out how to use variables with a screen gui.
local button = script.Parent
local starterGui = game:GetService("StarterGui")
local visible = true
local button2 =
local invisible = false
function newgui()
wait(0.03)
button.Visible = invisible
button2.Visible = visible
end
button.MouseButton1Click:Connect(newgui)
The button2 variable is empty.
im prob gonna get replied the most basic line of code but please don’t bully me
Here are some minor fixes. Can you expand on what you’re trying to do like trying to open a frame when you click the button or something??
local button = script.Parent.TextButton
local starterGui = game:GetService("StarterGui")--I don't think you'll need this line
local visible = true
local button2 = false--You can make button2 false and change it to true
local invisible = false
function newgui()
wait(0.03)
button.Visible = invisible
button2.Visible = visible --button2 doesn't exist in the explorer this would be an error you could do button2 = true
end
button.MouseButton1Click:Connect(newgui)