Need help with GUI script

Can someone tell me what is wrong with my script
It opens

local open = false
local sessiontimes = script.Parent.Parent.Parent.Parent.SessionTimesFrame
script.Parent.MouseButton1Click:Connect(function()
	if open == false then
		open = true
		sessiontimes:TweenPosition(UDim2.new(0.319, 0,0.271, 0), "InOut", "Sine", 0.5)
		
	else
		open = false
		
		sessiontimes:TweenPosition(UDim2.new(0.319, 0,-0.8, 0), "InOut", "Sine", 0.5)
		
	end
end)

This is all the frames etc
image

Many thanks in advance

1 Like

looks like you have an extra “parent” there friend
try this

local sessiontimes = script.Parent.Parent.Parent.SessionTimesFrame
3 Likes

Of course I do something like that, thanks!
And now it works!

1 Like

This happended to me once and I hope thats whats wrong
Do you see at the end of the script one of you “ends” doesnt have an )
WHAT YOU DID
end
end)

WHAT I THINK YOU SHOULD DO
end)
end)

nvm I was wrong