Whats wrong with my close frame script?

My localscript that is suppose to close a Frame is not working, I have tried to ask my scripting friends but they don’t understand what is wrong either.
(Note: There is no errors in my output either.)

Script:

local Avalible = true

function Close()
	wait(0.5)
	if Avalible == true then
		script.Parent.Parent.Parent.AnimationsMenuFrame.Visible = true
		script.Parent.Parent.Visible = false
		print("Closed")
	end
	
script.Parent.MouseButton1Click:Connect(Close)
end

Here is how my explorer looks like.

LocalScript

I would appreciate any help that I receive.

Put the

script.Parent.MouseButton1Click:Connect(Close)

outside of the function maybe…

EDIT: I’ll enjoy when this game comes out lol, I like the Fortnite dances :slight_smile:

:smiley: Can’t believe I didn’t notice it earlier…

1 Like