Script: How can i make the player able to see his body/character in First Person?

Hello Roblox Developer Community,
How can i make the player able to see his own character/body ? (locked first person.)
I wonder how i can make it happen.
If you have any suggestions or responses, feel free to tell me.
Thank you, have a great day !

- Kono

1 Like

HI there! To achieve this, you can create a LocalScript and write the following:

local Players = game:GetService("Players")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
-- load character
repeat task.wait() until player.Character
local Character = player.Character
local Humanoid = Character:WaitForChild("Humanoid")
local distance_Camera = (camera.CFrame.Position - camera.Focus.Position).Magnitude

-- Work
camera:GetPropertyChangedSignal("CFrame"):Connect(function()
	distance_Camera = (camera.CFrame.Position - camera.Focus.Position).Magnitude
end)

for i,v in pairs(player.Character:GetDescendants()) do
	if(v.Name ~= "HumanoidRootPart" and v.Name ~= "Head")then
		local S,F = pcall(function()
			if(v:IsA("Part") or v:IsA("MeshPart") and not v:IsA("Accessory"))then
				v.Transparency = 0
				v.LocalTransparencyModifier = 0
				v:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
					v.LocalTransparencyModifier = 0
				end)
			end
			if(v:IsA("Accessory"))then
				v.Handle.Transparency = 1
				v.Handle.LocalTransparencyModifier = 1
				v.Handle:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
					v.Handle.LocalTransparencyModifier = 1
				end)
			end
		end)
	end
end
2 Likes

sorry but it isn’t working for some reason. Does the script is supposed to be in StarterCharacterScripts ?

I put my localscript in StarterPlayerScript and it ran

2 Likes

In a local script, parented in starterchar scripts copy/write down the following:

localCharacter = game:GetService(“Players”).LocalPlayer.Character
game:GetService(“RunService”).RenderStepped:Connect(function()
for key, value in pairs(localCharacter:GetChildren()) do
if string.match(value.Name, “Arm”) then
value.LocalTransparencyModifier = 0
end
end
end)

localCharacter = game:GetService(“Players”).LocalPlayer.Character
game:GetService(“RunService”).RenderStepped:Connect(function()
for key, value in pairs(localCharacter:GetChildren()) do
if string.match(value.Name, “Leg”) then
value.LocalTransparencyModifier = 0
end
end
end)

localCharacter = game:GetService(“Players”).LocalPlayer.Character
game:GetService(“RunService”).RenderStepped:Connect(function()
for key, value in pairs(localCharacter:GetChildren()) do
if string.match(value.Name, “Torso”) then
value.LocalTransparencyModifier = 0
end
end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.