I've been trying to create new arms and weld them to the old ones and make them go in a 90 degree angle to get them to look like how they do in FPS (Halo,Destiny,COD,etc)
I've been trying over and over to get this to work but nothing I did was right maybe one of you great people can help me with this?
Please read the green text before downvoting.
01 | Debounce = false |
02 | game.Workspace.ChildAdded:connect( function (Player) --Calls the function everytime a Character respawn or load |
03 | local Humanoid = Player:FindFirstChild( "Humanoid" ) |
04 | if Humanoid then |
05 | if not Debounce then |
06 | Debounce = true |
07 |
08 | local ArmStorage = game.Workspace:FindFirstChild( "ArmStorage" ) --Check if there is a Model In Workspace called ArmStorage |
09 | if not ArmStorage then --If the Model doesn't Exist then... |
10 | local Model = Instance.new( "Model" , game.Workspace) --It creates a Model and Names it "ArmStorage" |
11 | Model.Name = "ArmStorage" |
12 | end |
13 | wait( 1 ) |
14 | print ( "Player Character Has Loaded" ) |
15 | local FakeArmL = Player [ "Left Arm" ] :Clone() --Clone the player's Arm |
I got this working by parenting the cloned arms to the Camera
. I also had to clone the Humanoid
and Shirt
from the character for the character's appearance to apply to the new arms.
You can see the arms when you look down or jump.
LocalScript in StarterGui:
01 | local Player = game.Players.LocalPlayer |
02 | local Char = Player.Character |
03 | local Cam = workspace.CurrentCamera |
04 |
05 | local Left = Char:WaitForChild( "Left Arm" ) |
06 | local Right = Char:WaitForChild( "Right Arm" ) |
07 |
08 | local FakeL = Left:Clone() --Create Fake arms |
09 | local FakeR = Right:Clone() |
10 |
11 | local RightW = Instance.new( "Weld" ,Right) --Weld arms together |
12 | local LeftW = Instance.new( "Weld" ,Left) |
13 | RightW.Part 0 = Right |
14 | RightW.Part 1 = FakeR |
15 | LeftW.Part 0 = Left |