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

How do I make R15 first person arms?

Asked by 7 years ago

This is my Script:

01game.Players.PlayerAdded:connect(function(Player)
02    game.Workspace:WaitForChild(Player.Name)
03    local Cam = Instance.new("Model",game.Workspace.CurrentCamera)
04    Cam.Name = "View"
05    for i,v in pairs(Player.Character:GetChildren())do
06        if v.Name == "LeftHand" or v.Name == "LeftLowerArm" or v.Name == "LeftUpperArm" then
07            local x = v:Clone()
08            x.Parent = Cam
09            x.Material = "SmoothPlastic"
10        end
11    end
12end)

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

2 answers

Log in to vote
3
Answered by
hellmatic 1523 Moderation Voter
7 years ago
Edited 7 years ago

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

01local player = game.Players.LocalPlayer
02local character = player.Character
03 
04local RightArmList = {'Right Arm', 'Right Hand', 'RightLowerArm', 'RightUpperArm'}
05local LeftArmList = {'Left Arm', 'Left Hand', 'LeftLowerArm', 'LeftUpperArm'}
06 
07game:GetService("RunService").RenderStepped:connect(function()
08    for _, v in pairs(character:GetChildren()) do
09        --RIGHT ARM--
10        for RA = 1, #RightArmList do
11            if v.Name == RightArmList[RA] then
12                v.LocalTransparencyModifier = 0
13            end
14        end
15 
View all 23 lines...
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) hellmatic 1523 — 7y
1
nice awesomeipod 607 — 7y
0
Thanks! MRbraveDragon 374 — 7y
Ad
Log in to vote
1
Answered by 7 years ago

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.

01local plr = game:GetService("Players").LocalPlayer
02local char = plr.Character or plr.CharacterAdded:Wait()
03 
04while wait() do -- i had to wrap it in a while loop as when you died it wouldn't go visible anymore
05    while wait() do -- in 2 while loops
06        game:GetService("RunService").RenderStepped:Wait()
07            local ch = char:GetChildren()
08            for c = 1, #ch do
09                if string.match(ch[c].Name,"Hand") or string.match(ch[c].Name, "Arm") then
10                    ch[c].LocalTransparencyModifier = 0
11            end
12        end
13    end
14end

Answer this question