Textures will not display if their transparency was initially 1

Hello,
I found that if a texture is parented to a Mesh Part and the texture has a transparency of 1, the next time you change the transparency of the texture, it will not show on the mesh.

Here is a small script to reproduce this bug

--[[
	
	Since we can't set a mesh parts mesh ID during runtime, we need to have a meshpart in the workspace to use for this example
	In game I have a mesh part called "MeshPart" in the workspace
	
]]-- 

local MeshPart = game.Workspace.MeshPart
local ExampleTextureID = "rbxasset://textures/ui/GuiImagePlaceholder.png" -- Lets use the roblox placeholder image for the texture

wait(1)

local Texture = Instance.new("Texture")
Texture.Texture = ExampleTextureID
Texture.Transparency = 1 
Texture.Parent = MeshPart


wait() 


Texture.Transparency = 0

-- The texture will now not show on the part even though its transparency is 0

Here is a small place with this bug:
ExamplePlace.rbxl (82.7 KB)

Here is a photo of the invisible texture
Chair

After duplicating the mesh, the texture appears as normal
Duplicated

Also I think this bug is recent because it was working less than 24 hours ago

8 Likes

I think I experienced something similar with decals and TweenService, pretty sure this (somewhat) explains it.

5 Likes

I am also experiencing this issue, very frustrating as it’s effecting players experience in my game.

3 Likes

+1. I have sticky goo spots that slow the player down in my game scary sushi. They are transparent parts with splatter decals. All the sudden yesterday players started complaining the goo spots were invisible, really makes the game impossible to play — had to change the whole system

3 Likes

I’m having this issue aswell. It is really annoying

1 Like

Here is a temporary fix that I am using

local Caught = {}

function OnDescendant(Dec)
	if not Caught[Dec] then
		if Dec:IsA("Texture") or Dec:IsA("Decal") then
			Caught[Dec] = true
			local X = 0 
			
			local OnChange = function()
				X += 1
				local N = X 
				task.defer(function()
					if N == X and Dec:IsDescendantOf(game) then
						if Dec.Transparency == 1 then
							local p = Dec.Parent 
							Dec.Parent = nil
							Dec.Transparency = 0.99
							Dec.Parent = p 
						end
					end
				end)
			end
			Dec:GetPropertyChangedSignal("Transparency"):Connect(OnChange)
			OnChange()
		end
	end	
end

for i,v in pairs(game.Workspace:GetDescendants()) do
	OnDescendant(v)
end
game.Workspace.DescendantAdded:Connect(OnDescendant)

Put this in a local script and it will listen for whenever a textures transparency is set to 1 and it will set it to 0.99 instead, then it will unparent it and reparent it to fix the issue

1 Like

Hello,

My apologies for the troubles, it looks like one of my code changes (in an attempt to optimize) has introduced this issue. I have disabled the feature, so it should go back to normal behavior (I have verified this with running the ExamplePlace.rblx locally)

I want to call out that this is a awesome bug report by @indieun_X ! It contains a very clear description as to what the issue is, it contains a repro case that allows us to very quickly find the issue! And then there is a work around! This is absolutely amazing bug reporting, that will also help us in fixing the issue introduced and verifying correct behavior.

So thank you @indieun_X !

6 Likes