Udim2 Not Changing Ui Size

Hello! I am trying to make a visual coldown system where a frame gets tweened from a size covering the whole frame, to a size that isn’t visible.

image
…–…- image
…—…-image

However I can’t seem to able to modify the size. Here is the code I am using.

UserInputService.InputBegan:Connect(function(input, isProcessed)
	if isProcessed then return end
	if input.KeyCode == Enum.KeyCode.F then
		ui.Frame.Size = UDim2.new(1, 0, 1, 0) 
		ui.Frame.Position = UDim2.new(0, 0,-0, 0)
		
		print("F key pressed")
		playRandomPunch()
	end
end)


You can see that the size says it changes in the properties, but in reality it doesn’t change at all. Why is this happening and how can I fix this?

Any help is apreciated!

What exactly is ui.Frame indexing? Can you provide more of the script? Also, setting the position to -0 on Y scale isn’t going to change anything, not sure if you meant to put -1?