textbut = script.Parent.Map textbut.MouseButton1Click:connect(function() if script.Parent.ScrollingFrame.Visible == true then script.Parent.ScrollingFrame.Visible = false textbut.Text = 'Open Map' else script.Parent.ScrollingFrame.Visible = true textbut.Text = 'Close Map' end end)
I fixed it just a simple error with another script
First of all, make sure it's a LocalScript. Second of all, when opening Guis, it's a lot more simple than that. Simply do;
textbut=script.Parent.Map textbut.MouseButton1Click:connect(function() script.Parent.ScrolingFrame.Visible=not script.Parent.ScrollingFrame.Visible end)
Turning an 11 line code to 5 lines.