Body visible in first person

How to make body visible when in first person?

3 Likes

You need to make the LocalTransparencyModifier of the limbs 0.

4 Likes

How do I access this variable?

2 Likes

It’s on any basepart so parts, meshparts, etc.

1 Like

You loop through all the descendants of character and after validating that it is a base-art, you set their LocalTransparencyModifier to 0.

local character = player.Character

for _, part in character:GetDescendants() do
    if part:IsA("BasePart") then part.LocalTransparencyModifier = 0 end
end

Though the drawback is that you would have to call this function every time the character goes to first person if your game isn’t first person only. The workaround to this is to fork the TransparencyController of the PlayerModule.

Why? Wouldn’t this just set it once and then finished? If the script is in starter character scripts.

Roblox internally sets all base parts local transparency modifier to 1 while transitioning to fp (afaik, myt not be accurate)

This method doesn’t seem to work.

Make some research before posting a question. This has been asked and answered before.

I have already seen that post and I dislike the method, it uses runservice which could tank performance, I’m looking for something which would only happen once when the character is created.

this has to be a localscript in startercharacterscripts

local RunService = game:GetService("RunService")
local Char = script.Parent
RunService.RenderStepped:Connect(function()
for _,p in ipairs(Char:GetChildren()) do
if p:IsA("BasePart")
p.LocalTransparencyModifier = p.Transparency
end
 end
end)
2 Likes
for i, v in script.Parent:GetChildren() do
	if not v:IsA("BasePart") then
		continue
	end
	v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
		v.LocalTransparencyModifier = 0
	end)
	
	v.LocalTransparencyModifier = 0
end

script.Parent.ChildAdded:Connect(function(v)
	if not v:IsA("BasePart") then
		return
	end
	v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
		v.LocalTransparencyModifier = 0
	end)

	v.LocalTransparencyModifier = 0
end)
1 Like

I don’t think there is a way to make the parts visible by something that would only happen once when the character is created as the body transparency is updated on every heartbeat I think.

But you could try modifying Roblox’s PlayerModule.

In Studio press play, go into StarterPlayer > StarterPlayerScripts > PlayerModule. Copy and paste it.

Then go to PlayerModule > CameraModule > TransparencyController

And modify this function:

function TransparencyController:IsValidPartToModify(part: BasePart)
	if part:IsA('BasePart') or part:IsA('Decal') then
		return not self:HasToolAncestor(part)
	end
	return false
end

Into this:

function TransparencyController:IsValidPartToModify(part: BasePart)
	if part:IsA('BasePart') or part:IsA('Decal') then
		return self:HasToolAncestor(part)
	end
	return false
end

This will make the body parts and accessories visible in first person without causing lag.

2 Likes