Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Are there any alternatives for editing the Camera's clipping plane?

Asked by 4 years ago
Edited 4 years ago

I'm trying to make it so that you can see the player's arms and tools held while the player is in first person. Is it possible to do so by modifying camera settings or do I have to do some voodo stuff?

1 answer

Log in to vote
1
Answered by
royaltoe 5144 Moderation Voter Community Moderator
4 years ago
Edited 4 years ago

ROBLOX makes your character transparent when in first person mode/zoomed in.

But, you can stop that by using LocalTransparencyModifier.

Have a localscript in the StarterPlayer->StarterCharacterScripts **Depending on if you have an R6 character and a R15 character there will be different solutions. **

For both solutions, we'll want to update the transparency with RenderStepped which updates the transparency every frame. We want to update it every frame to

video of it working

R15 Solution:

local RunService = game:GetService("RunService")
local character = game.Players.LocalPlayer.Character


--run the function every frame
RunService.RenderStepped:Connect(function()
    --make left arm visible
    character.LeftHand.LocalTransparencyModifier = 0
    character.LeftLowerArm.LocalTransparencyModifier = 0
    character.LeftUpperArm.LocalTransparencyModifier = 0

    --make right arm visible
    character.RightHand.LocalTransparencyModifier = 0
    character.RightLowerArm.LocalTransparencyModifier = 0
    character.RightUpperArm.LocalTransparencyModifier = 0
end)

R6 Solution:

local RunService = game:GetService("RunService")
local character = game.Players.LocalPlayer.Character

--run the function every frame
RunService.RenderStepped:Connect(function()
    character["Right Arm"].LocalTransparencyModifier = 0    --make left arm visible
    character["Left Arm"].LocalTransparencyModifier = 0     --make right arm visible
end)
Ad

Answer this question