UICorner not tweening correctly

I wanted the UICorner to slowly tween to being less round, but this happens when I start the tweens.

The code used to tween the UICorner is:

local button = script.Parent
local firstLabel = button.account_circle
local frame = script.Parent.Parent.Frame
local secondLabel = frame.account_circle
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local value = false

button.MouseButton1Click:Connect(function()
	if value == false then
		value = true		
		local tween = TweenService:Create(frame, tweenInfo, {Size = UDim2.new(0.595, 0,0.638, 0)})
		local tween1 = TweenService:Create(frame.UICorner, tweenInfo, {CornerRadius = UDim.new(0, 3)})
		local tween3 = TweenService:Create(frame, tweenInfo, {Position = UDim2.new(0, 190,0, 419)})	
		tween:Play()
		tween1:Play()
		tween3:Play()
		value = false
	end
end)

I suggest you use scale instead of offset

Still doesn’t work.
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ

the scale should be way smaller. Maybe like 0 or 0.001

Doesn’t work either.
ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤv

can I see your result and your code

maybe add another ui corner when it completes?

You are setting the corner radius to 3 pixels here:

local tween1 = TweenService:Create(frame.UICorner, tweenInfo, {CornerRadius = UDim.new(0, 3)})

Now 3 pixels are very small. So small in fact that they will make the UI look like a rectangle, try to either use scale or use a much higher value than 3, maybe 100 or even 200.

For the border make sure you are using a UI stroke as that can be the cause for why the black border gets so big

I want it to be that small radius.


image

repeat wait() until game:IsLoaded() and game.Players.LocalPlayer.Character

local button = script.Parent
local firstLabel = button.account_circle
local frame = script.Parent.Parent.Frame
local secondLabel = frame.account_circle
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.In)
local value = false

button.MouseButton1Click:Connect(function()
	if value == false then
		value = true
		button.BackgroundTransparency = 1
		firstLabel.ImageTransparency = 1
		frame.BackgroundTransparency = 0
		secondLabel.ImageTransparency = 0
		
		local tween = TweenService:Create(frame, tweenInfo, {Size = UDim2.new(0.595, 0,0.638, 0)})
		local tween1 = TweenService:Create(frame.UICorner, tweenInfo, {CornerRadius = UDim.new(0.01,0)})
		local tween3 = TweenService:Create(frame, tweenInfo, {Position = UDim2.new(0, 190,0, 419)})
		
		tween:Play()
		tween1:Play()
		tween3:Play()
		value = false
	end
end)

Wouldn’t that do the same thing, just with another UICorner added? It should slowly decrease the roundness of the corner, not instantly change it.

Im not sure as to why that is occurring because it works just fine for me:

Never mind, your Script wasn’t the issue I just set the wrong UICorner to 1,0, thanks for the help.

Glad I could help
--------------------------------------