Your size variable is kept constant throughout your code. When you assign a value to a variable, it will not hold a reference to the attribute – it just holds the value at the time of assignment / initialisation. It’s not like you will get the new value of the attribute from it basically
You also can’t change a vector’s components directly, since they’re immutable.You would to get the current value when the event fires by creating a variable in the event:
local part = script.Parent.Parte
script.Parent.AttributeChanged:Connect(function()
part.Size = part:GetAttribute("PartSize")
end)