LOCAL SCRIPT x2
local character = game.Players.LocalPlayer.Character
wait(1)
for i, v in pairs(character:GetChildren()) do
if v:IsA("MeshPart") and v.Name ~= "Head" and not v:IsA("Hat") then
v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
v.LocalTransparencyModifier = v.Transparency
end)
v.LocalTransparencyModifier = v.Transparency
elseif v:IsA("Hat") then
v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
v.LocalTransparencyModifier = 1
end)
v.LocalTransparencyModifier = 1
end
end
--next part is optional (used for when you use tools that are welded to your arm instead of parented to a tool object)
for i, v in pairs(character:GetChildren()) do
if v:IsA("Model") then
for i, b in pairs(v:GetChildren()) do
if b:IsA("Part") or b:IsA("UnionOperation") then
b:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
b.LocalTransparencyModifier = b.Transparency
b.Transparency = b.Transparency
end)
b.Transparency = b.Transparency
b.LocalTransparencyModifier = b.Transparency
end
end
end
end
Except there is a problem, when you start walking or jumping the camera doesnt seem to follow your head. For that we use this script
local rs = game:GetService("RunService")
local character = game.Players.LocalPlayer.Character
rs.RenderStepped:Connect(function()
if character then
character.Humanoid.CameraOffset = -Vector3.new(0,-(character.Head.Position.Y-character.HumanoidRootPart.Position.Y - 1.5),(math.abs(character.Head.Position.Z-character.HumanoidRootPart.Position.Z)+math.abs(character.Head.Position.X-character.HumanoidRootPart.Position.X)+1))
end
end)
That is all you would need to get the first person body just like doors has