Weird behavior of Tween with Transparency

I have these 2 parts:

When I make a transparency tween from 0 to 1 and then from 1 to 0 for both parts at the same time, you can notice that the top of the bottom object is having a sudden transition, different from the normal transition:


This is the script:

local TweenService = game:GetService("TweenService")

function T(Object, Value)
	local Tween = TweenService:Create(
		Object,, {Transparency = Value} 
for i = 1, 2 do
	T(workspace.Part1, 1)
	T(workspace.Part2, 1)
	T(workspace.Part1, 0)
	T(workspace.Part2, 0)

This is the test project in order to facilitate:

tween.rbxl (23.8 KB)

What’s going on?
How to avoid this weird effect?


There’s not much you can do but since they are bot the same texture you can Union them and they’ll behave as one, avoiding that effect. Alternatively you can make it faster

1 Like

They are parts of a wall that has variable dimensions, which are created during the game.
Initially, I used SubstractAsync() to have a single part (a single wall with holes for windows), but due to the bug in this function that until today has not been solved, I was forced to create multiple parts of a wall around the windows.
However, when I want to hide or show these walls using a tween, this problem now occurs …

So I’m stuck: I can’t use SubstractAsync() to have a single part and I can’t use TweenService for multipart transparency …

if you want to do this, change material to glass

Did you test it? It makes no difference …

this is completely normal behaviour due to the way roblox renders transparent materials, glass material usually get’s rid of anything transparent seen through it

Did you pay attention to the final part when the transparency of the top face is reaching 0 (when the parts go from invisible to visible)?
The top face is not gradually being transparent, and it’s suddenly disappearing.
It’s not normal behavior.

This is likely an artifact of the same sorting issue that causes transparent decals and textures to layer inappropriately. It’s a very old engine quirk.



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.