Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

textbut.MouseButton1Click:connect(function() not working? FIXED

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

1 comment

1

What error do you get in the Output?

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.