I am trying to make a script so when you click the Spawn button all of the GUI goes away. For some reason I am getting no errors and the GUI will not go away. Anyone know what I am doing wrong?
Code-
local GUI = script.Parent.Parent.Scripts.MorphGUI
local Button = script.Parent
print("Spawn script exists")
Button.MouseButton1Click:Connect(function(disablegui)
print("working")
GUI.RG_Uniforms.Visible = false
GUI.CG_Uniforms.Visible = false
GUI.KG_Uniforms.Visible = false
GUI.SG_Uniforms.Visible = false
GUI.GOL_Uniforms.Visible = false
GUI.ARC_Uniforms.Visible = false
GUI.RC_Uniforms.Visible = false
GUI.Senate_Uniforms.Visible = false
GUI.DEV_Uniforms.Visible = false
GUI.RI_Uniforms.Visible = false
GUI.GATR_Uniforms.Visible = false
GUI.Legions.Visible = false
Button.Visible = false
print("done")
end)
Explorer-