To be honest, this worked before until I changed my GUI system to have a bunch of different ScreenGUIs rather than Frames in one big screengui.
I thought it was the hierarchy that was making it break, but clearly not. This is utterly confusing. I don't get it.
Code:
local black = false function nope123n() if black == false then print("my") script.Parent:TweenPosition(UDim2.new(0.5, -120,0.5, -125), "In", "Linear", 1) wait(0.1) black = true script.Parent.Parent.BailiffPanel.Text = "Close Panel" elseif black == true then print("hit") script.Parent:TweenPosition(UDim2.new(0.5, -120,0.5, -825), "Out", "Linear", 1) black = false script.Parent.Parent.BailiffPanel.Text = "Bailiff Panel" end end script.Parent.Parent.Parent.MenuGui.Mainframe.BailiffPanel.MouseButton1Click:connect(nope123n)
Hierarchy (needed):
GIF:
http://i.imgur.com/heUoH1V.gif
This is pretty confusing, I hope you guys can help!
edit: I fixed it, lines #9 and #14 were not formatted to the correct hierarchy and somehow the computer didn't manage to get to that line.
edit: I fixed it, lines #9 and #14 were not formatted to the correct hierarchy and somehow the computer didn't manage to get to that line.