This is a script to make a certain GUI visible/not-visible. What is wrong with this code? vis is a BoolValue in StarterGUI of its ScreenGUI. Any help is great! Thanks.
local vis = script.Parent.Parent.vis
vis = false
repeat wait()
script.Parent.Visible = false
script.Parent.Parent.Button.Visible = false
until vis == true
if vis == true
then
script.Parent.Visible = true
script.Parent.Parent.Button.Visible = true
end