How to make this Frame size decrease from top to bottom?

  1. What do you want to achieve?
    I’m Trying to make the size decrease from top to bottom.

  2. What is the issue?
    The size of the frame decreases from bottom to top

    bandicam 2020-12-10 13-25-25-564

  3. What solutions have you tried so far?
    I have looked up multiple subjects on the dev forum containing information of Guis. I have also played around with the Position and Anchor Point of the Frame, but I couldn’t figure anything out.

local UserInputService = game:GetService("UserInputService")
local max = 100
local value = 100



UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
	if gameProcessedEvent then
		return
	end
	if input.KeyCode == Enum.KeyCode.E then
		value = value -10
		script.Parent.Size = UDim2.new(1,0,value/max,0)
	end
end)
1 Like

if input.KeyCode == Enum.KeyCode.E then
value = value -10
script.Parent.Size = UDim2.new(1,0,-value/max,0)
end

Try to change the UDim2.new(1,0,value/max,0) to UDim2.new(1,0,-value/max,0)

This doesnt work, lets say the value was 90 and you you do -90/100 then the percentage would be -90%. Meaning it would just sky rocket the Frame size in to the sky.

1 Like

Or maybe instead of adding the value inside the UDIM, try subtracting maybe .1 each time it goes down or something like that.

change the anchor point to top of frame and use the y axis to decrease or increase

or

rotate the frame by 180 degrees

there i made one for you