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)
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
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)