Hello, I was just wondering how do I make all body untransparent other then the head when players are in first person, (I’d want to keep first person lock on) and the only thing I could think of was using LocalTransparencyModifier. And, yes, I did look over them devForums.
LocalTransparencyModifier is exactly what you need to use. If you take a look in the core camera scripts, you will see that is what they use as well.
Do I see core camera scripts by pressing play then checking through scripts, if not, then how?
I have code for this. It’s a salvage from when I provided it for another thread, but it can be easily tailored for your use case.
local RunService = game:GetService("RunService")
local LocalPlayer = game:GetService("Players").LocalPlayer
local RENDER_PRIORITY = Enum.RenderPriority.Character.Value - 5
local function updateCharacterTransparency()
local character = LocalPlayer.Character
if character then
for _, part in ipairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.LocalTransparencyModifier = 0
end
end
end
end
RunService:BindToRenderStep("CharacterTransparency", RENDER_PRIORITY, updateCharacterTransparency)
It uses the same method as the PlayerScripts do for enforcing first person transparency. This one makes your entire body visible, so making only specific body parts visible in first person requires editing of the for loop that iterates through the descendants of the character.
I’ll try this out really soon, and it’s funny, I was literally going to ask you about this! Thanks! You’re the best!