Position change not work

Hi. I need help. When I click the button, it changes the position of the gui and the second does not. video:
https://www.youtube.com/watch?v=RYJAw22Tswc&feature=youtu.be
script:
button = script.Parent
window = script.Parent.Parent

function onClicked(GUI)
window.Position = UDim2.new(0, 0, 0.823, 0)
end
script.Parent.MouseButton1Click:connect(onClicked)

Could you add some print statements or check for any errors?

2 Likes

I would suggest you don’t use global variables and use local variables instead. Doing button = script.Parent and so on isn’t good practice.