server script:

game:GetService("ReplicatedStorage"):WaitForChild("invisible").OnServerEvent:Connect(function(Plr)

for i,v in pairs(Plr.Character:GetChildren()) do

if not v.Name == "HumanoidRootPart" then

if v:IsA("MeshPart") then

if v.Transparency == 0 then

v.Transparency = 1

print(v.Name..v.Transparency)

end

end

if v:IsA("Part") then

if v.Transparency == 0 then

v.Transparency = 1

print(v.Name..v.Transparency)

end

end

if v:IsA("Accessory") then

if v.Handle.Transparency == 0 then

v.Handle.Transparency = 1

print(v.Handle.Name..v.Handle.Transparency)

end

end

if v:IsA("MeshPart") then

if v.Transparency == 1 then

v.Transparency = 0

print(v.Name..v.Transparency)

end

end

if v:IsA("Part") then

if v.Transparency == 1 then

v.Transparency = 0

print(v.Name..v.Transparency)

end

end

if v:IsA("Accessory") then

if v.Handle.Transparency == 1 then

v.Handle.Transparency = 0

print(v.Handle.Name..v.Handle.Transparency)

end

end

end

end

end)

no output

4 comments

0

So what exactly are you trying to accomplish here??

0

And what is the exact problem that's occurring??

0

im trying to make the players character invisible if its visible and the opposite but it does the same thing to humanoid so u could see a humanoid going around in the world when u go invis and i dont wan that

0

Try checking if v.Name == "HumanoidRootPart"