Help with MeshPart Transparency in a sword sheathing system

I’m trying to make the Katana in the sheathe turn transparent when I press the keybind (E) to unsheathe it. (Equipping the actual weapon) I scripted a cloning process to add transparent SurfaceAppearance to each MeshPart but they load in really slow. Any way to fix this?

for _, v in pairs ((fakesword):GetChildren()) do
			if v:IsA("MeshPart") then
			transp:Clone().Parent = v

code used for the cloning in case it matters ^^

1 Like

If they’re just a form of BasePart (MeshPart in this case), why not just use the Transparent property?

-- Make invisible
for _, v in pairs ((fakesword):GetChildren()) do
	if v:IsA("MeshPart") then
	    v.Transparent = 1
    end
end

-- Make visible
for _, v in pairs ((fakesword):GetChildren()) do
	if v:IsA("MeshPart") then
	    v.Transparent = 0
    end
end
1 Like

Unfortunately that does the same thing. It just slowly rebuilds the transparency of the katana.

Interesting. If you don’t mind, can you send a copy of the file in messages? I want to see if I run into this issue myself.

1 Like

Nvm I figured it out, I had some weird coding going on and it was making it load slower.

2 Likes

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