I was wondering why isn't this script welding the player's arms to the cloned arms and cloning the left arm? If you manged to fix it please show how and what you did. I got no errors in the output.
01 | game.Players.PlayerAdded:connect( function (Player) |
02 | Player.CharacterAdded:connect( function (Character) |
03 | --------------------------------------------------------- |
04 | function MakeDisplayArms() |
05 | --------------------------------------------------------- |
06 | local CurrentCamera = game.Workspace.CurrentCamera |
07 | local PlayerArms = { |
08 | Character [ "Right Arm" ] , |
09 | Character [ "Left Arm" ] } |
10 | --------------------------------------------------------- |
11 | for i,v in pairs (PlayerArms) do |
12 | Character:WaitForChild(v.Name) |
13 | FoundClonedArms = CurrentCamera:FindFirstChild( "Cloned_" ..v.Name) --Finds for Cloned parts |
14 | if not FoundClonedArms then --Litte debounce |
15 | print (v) |
What is this script suppose to do? This script is suppose to make a fake arm that is hidden in the CurrentCamera and that the player can see his arm when zoomed in.
I removed the debounce, because it's not needed. Then I moved the 'Return' outside the for loop. In your script, the for loop stopped after cloning the first arm. Then for the extra table, I made that one to hold the new cloned arms. So they can be returned as a table at the end of the function.
01 | game.Players.PlayerAdded:connect( function (Player) |
02 | Player.CharacterAdded:connect( function (Character) |
03 | --------------------------------------------------------- |
04 | function MakeDisplayArms() |
05 | wait() |
06 | --------------------------------------------------------- |
07 | local CurrentCamera = game.Workspace.CurrentCamera |
08 | local PlayerArms = { |
09 | Character [ "Right Arm" ] , |
10 | Character [ "Left Arm" ] } |
11 | local ClonedArms = { } |
12 | --------------------------------------------------------- |
13 | for i,v in pairs (PlayerArms) do |
14 | Character:WaitForChild(v.Name) |
15 | local Clone = v:Clone() |
Now for example
1 | -- If you put: |
2 | print (Arms [ 2 ] .Name.. " and " ..Arms [ 1 ] .Name) |
3 | -- After: |
4 | Arms = MakeDisplayArms() |
It will print Left Arm and Right Arm