Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make R15 first person arms?

This is my Script:

game.Players.PlayerAdded:connect(function(Player)
	game.Workspace:WaitForChild(Player.Name)
	local Cam = Instance.new("Model",game.Workspace.CurrentCamera)
	Cam.Name = "View"
	for i,v in pairs(Player.Character:GetChildren())do
		if v.Name == "LeftHand" or v.Name == "LeftLowerArm" or v.Name == "LeftUpperArm" then
			local x = v:Clone()
			x.Parent = Cam
			x.Material = "SmoothPlastic"
		end 
	end
end)

The problem is that when the player spawns in the Left arm looks deformed. How would I fix that problem?

2 answers

✓ Accepted answer

Paste this in a LocalScript and place it in StarterCharacterScripts or StarterPack.

local player = game.Players.LocalPlayer
local character = player.Character

local RightArmList = {'Right Arm', 'Right Hand', 'RightLowerArm', 'RightUpperArm'}
local LeftArmList = {'Left Arm', 'Left Hand', 'LeftLowerArm', 'LeftUpperArm'}

game:GetService("RunService").RenderStepped:connect(function()
	for _, v in pairs(character:GetChildren()) do 
		--RIGHT ARM--
		for RA = 1, #RightArmList do 
			if v.Name == RightArmList[RA] then 
				v.LocalTransparencyModifier = 0
			end
		end
		
		--LEFT ARM--
		for LA = 1, #LeftArmList do 
			if v.Name == LeftArmList[LA] then 
				v.LocalTransparencyModifier = 0
			end
		end
	end
end)

3 comments

0

This makes your arms visible when you are first personed or fully zoomed in. Make sure to include all the part names for the right and left arm in R15 character (probably missed a few)

1

nice

0

Thanks!

LocalScript inside of StarterPlayerScripts. This one is much more efficient than the first answer as this one needs no tables and works for both R6 and R15, so yeah.

local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()

while wait() do -- i had to wrap it in a while loop as when you died it wouldn't go visible anymore
    while wait() do -- in 2 while loops 
        game:GetService("RunService").RenderStepped:Wait()
            local ch = char:GetChildren()
            for c = 1, #ch do
                if string.match(ch[c].Name,"Hand") or string.match(ch[c].Name, "Arm") then
                    ch[c].LocalTransparencyModifier = 0
            end
        end
    end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.