Open Button wont work

I’m trying to make a admin panel for my game, but sadly, the open button wont work at all.

What I want: I want the button to be fully functional with opening and closing.

robloxapp-20221018-1621054.wmv ( Sorry if I sent picture instead of video! )

robloxapp-20221020-1657384.wmv (231.9 KB)

script: Preformatted text

Your error still remains by the “if not then”. You are not comparing anything in there. What you would want to do is to use the MouseLeave event to open your panel.

I did not realise that, but I do not understand on what you mean for the last one, like where to put it, and to make sure if theirs not any errors

Instead of doing if not then, use the mouse event “MouseLeave” similarly to how u use “MouseEnter”

1 Like
script.Parent.Activated:Connect(function()
	if script.Parent.Parent.Main.Visible == true then
		script.Parent.Parent.Main.Visible = false
	else
		script.Parent.Parent.Main.Visible = true
	end
end)

script.Parent.MouseEnter:Connect(function()
	if script.Parent.Parent.Main.Visible == true then
		script.Parent.Text = "Close Panel" 
	else
		script.Parent.Text = "Open Panel" 
	end
end)

1 Like