Im trying to make the body visible when a tag is added during first person, but it isn't making it visible...
local observer = require(game.ReplicatedStorage.ModuleUniversal.CoreUtilities.Observers)
local armParts = {
["Left Arm"] = true,
["Right Arm"] = true,
["Left Leg"] = true,
["Right Leg"] = true,
["Torso"] = true
}
function module:Init()
observer.observeTag("Game", function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
local modifiedParts = {} -- Part becomes invisible for the return function
for _, obj in ipairs(char:GetDescendants()) do
if obj:IsA("BasePart") and armParts[obj.Name] then
modifiedParts[obj] = 1
obj.LocalTransparencyModifier = 0
elseif obj:IsA("Accessory") then
local handle = obj:FindFirstChild("Handle")
if handle and handle:IsA("BasePart") then
modifiedParts[handle] = 1
handle.LocalTransparencyModifier = 0
end
end
end
return function()
for part, original in pairs(modifiedParts) do
if part and part.Parent then
part.LocalTransparencyModifier = original
end
end
end
end)
end```