Is it possible to make an accessories transparency between 0 and 1 without this weird effect occurring?

  1. What do you want to achieve?
    I want to make an accessories transparency 0.001 (or any transparency between 0 and 1) without this weird effect occurring.
  2. What is the issue?
    When setting the transparency of the handle of an accessory to a number between 0 and 1, a weird effect occurs where certain parts of the accessory are invisible/clipped depending on where the camera is positioned looking at the accessory.
  3. What solutions have you tried so far?
    I haven’t seen anyone else talking about this, and I’ve tried to set the transparency to a huge array of decimals, as well as trying out multiple accessories of different categories, and I’ve also tried setting the transparency via properties tab and via script, with similar results occurring either way.

Hair with transparency set to 0.001 above
pic
Hair with transparency set to 0 above

Here is the code I made to change the transparency of a player, note the hair. When the player touches a brick, the transparency of their body parts and accessories change.

game.Workspace.innerbox.floor.Touched:Connect(function(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil) then
		local limbs = hit.Parent:GetChildren()	
		for i,v in pairs(limbs) do
			if v:IsA('Part') and v.Name ~= "HumanoidRootPart" or v:IsA('BasePart') and v.Name ~= "HumanoidRootPart" or v:IsA('MeshPart') and v.Name ~= "HumanoidRootPart" then
				v.Transparency = 0.001
			end
			if v:FindFirstChild("Handle") then
					v:FindFirstChild("Handle").Transparency = 0.001
			end
		end
	end
end)

unfortunately I believe that this is a known bug with the internal roblox rendering engine, which commonly occurs with multiple transparent objects which are both visibly in the same place on the screen. For example transparent particles behind a window created using transparency may appear to be rendered in front of the window.

In your case it’s likely that the different hairs/layers of the hat aren’t being rendered in the correct order due to this same issue, and unfortunately I’m unaware of a method for fixing it, sorry.

All I can personally suggest would be to find a workaround for this bug that you feel comfortable using in your game. Hopefully you find a fix!

4 Likes