I want to make a realistic first person I used this but in first person my right hand and right foot not showing. Other body parts is showing but i dont know why its happening. Also my character is r15. People saying it works only r6 but i dont want to change my character to r6.
here is script:
local char = script.Parent
local RunService = game:GetService("RunService")
char.Humanoid.CameraOffset = Vector3.new(0, 0, -1)
for i, v in pairs(char:GetChildren()) do
if v:IsA("BasePart") and v.Name ~= "Head" then
v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
v.LocalTransparencyModifier = v.Transparency
end)
v.LocalTransparencyModifier = v.Transparency
end
end
RunService.RenderStepped:Connect(function(step)
local ray = Ray.new(char.Head.Position, ((char.Head.CFrame + char.Head.CFrame.LookVector * 2) - char.Head.Position).Position.Unit)
local ignoreList = char:GetChildren()
local hit, pos = game.Workspace:FindPartOnRayWithIgnoreList(ray, ignoreList)
if hit then
char.Humanoid.CameraOffset = Vector3.new(0, 0, -(char.Head.Position - pos).magnitude)
else
char.Humanoid.CameraOffset = Vector3.new(0, 0, -1)
end
end)
You probably want to track ChildAdded on the character too, and set LocalTransparencyModifier at that point (the same as you have in your loop body). This might be a side effect of how avatar loading works.
local function processChild(child)
if not child:IsA("BasePart") then
return
end
if child.Name == "Head" then
return
end
child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
child.LocalTransparencyModifier = child.Transparency
end)
child.LocalTransparencyModifier = child.Transparency
end
for _, child in character:GetChildren() do
processChild(child)
end
character.ChildAdded:Connect(processChild)
The idea is the old right hand is probably being replaced when the user’s avatar bundle loads in.
The truth is that I have not tried it but it is something that I needed urgently and I think that it should work. Thank you very much and God bless you. but a question:
This would not stop being obsolete in the next updates as happened with the previous method that no longer works