What do you want to achieve? Hello, i need to make the first person arms back to transparent after i turned them visible for something, i use this script to make the arms visible in first person :
local armsParts = {"LeftHand", "LeftLowerArm", "LeftUpperArm", "RightHand", "RightLowerArm", "RightUpperArm"}
for i, bodyPart in pairs(player.Character:GetChildren()) do
if table.find(armsParts, bodyPart.Name) and bodyPart:IsA("BasePart") then
bodyPart.LocalTransparencyModifier = bodyPart.Transparency
bodyPart:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
bodyPart.LocalTransparencyModifier = bodyPart.Transparency
end)
end
end
What is the issue? I can’t manage to make the first person arms transparent back again
What solutions have you tried so far? I looked on forums and tried to fix it myself.
local children = player.Character:GetChildren()
for i,arm in pairs(children) do
if arm.Name == "RightHand" or arm.Name == "RightLowerArm" or arm.Name == "RightUpperArm" then
arm.Transparency = 1
end
end
local modifier = 0
game:GetService("RunService").RenderStepped:Connect(function(dt)
for _, obj in pairs(player.Character:GetChildren()) do
if obj:IsA("BasePart") then
obj.LocalTransparencyModifier = modifier
end
end
end)
local function show() -- turn back to Visible
modifier = 0
end
local function hide() -- turn back to Transparent/Invisible
modifier = 1
end
hide()