LocalTransparencyModifier not working for me

just trying to have the body show in first person and i have this code

local Player = game:GetService("Players")["LocalPlayer"]
local Character = Player.Character

local function SCLT()
	for i, v in ipairs(Character:GetChildren()) do
		if v:IsA("BasePart") then
			v.LocalTransparencyModifier = 0
		end
	end
end

while task.wait() do
	SCLT()
end

but whenever i go in first person it’s still invisible
not sure what im doing wrong

This may help you

How to make my body show in first person? - Help and Feedback / Scripting Support - DevForum | Roblox

Here us the code from it

local RunService = game:GetService("RunService");
local Player = game.Players.LocalPlayer;
local Character = Player.Character or Player.CharacterAdded:Wait();
local Camera = game.Workspace.CurrentCamera;
local Head = Character:WaitForChild("Head");

local FPMaximumDistance = 0.6; -- For scalability, but keep it at 0.6 since it is the right distance.
local FirstPersonLocalTransparency = 0;
local ThirdPresonLocalTransparency = 0;

local function SetCharacterLocalTransparency(transparency)
	for i,v in pairs(Character:GetChildren()) do
		if (v:IsA("BasePart")) and (v.Name ~= "Head") then -- Only baseparts have a LocalTransparencyModifier property.
			v.LocalTransparencyModifier = transparency;
		elseif (v:IsA("Accessory")) and (v:FindFirstChild("Handle")) then
			if v.Handle:FindFirstChild("AccessoryWeld").Part1 == Head then

			else
				v:FindFirstChild("Handle").LocalTransparencyModifier = transparency;
			end
		end
	end
end

RunService.RenderStepped:Connect(function()
	local isfirstperson = (Head.CFrame.Position - Camera.CFrame.Position).Magnitude < FPMaximumDistance; -- Determine wether we are in first person
	if (isfirstperson) then
		SetCharacterLocalTransparency(FirstPersonLocalTransparency);
	else
		SetCharacterLocalTransparency(ThirdPresonLocalTransparency);
	end
end)

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