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

How can I make fake arms that follow the mouse like in FPS?

Asked by
Hero_ic 502 Moderation Voter
10 years ago

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?

2 answers

Log in to vote
0
Answered by 10 years ago

Please read the green text before downvoting.

01Debounce = false
02game.Workspace.ChildAdded:connect(function(Player)--Calls the function everytime a Character respawn or load
03local Humanoid = Player:FindFirstChild("Humanoid")
04if Humanoid then
05if not Debounce then
06    Debounce = true
07 
08local ArmStorage = game.Workspace:FindFirstChild("ArmStorage")--Check if there is a Model In Workspace called ArmStorage
09if 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"
12end
13    wait(1)
14print("Player Character Has Loaded")
15    local FakeArmL = Player["Left Arm"]:Clone()--Clone the player's Arm
View all 34 lines...
1
You do not have an explanation PLUS you cannot post the full script on the site. Read the rule book. EzraNehemiah_TF2 3552 — 10y
0
Its fine he did have an explanation! Hero_ic 502 — 10y
0
I have explained it if you can't see the green comment I made. Also there nowhere in the rule book where it says your not allowed to give "full script" while explaining it! UserOnly20Characters 890 — 10y
Ad
Log in to vote
2
Answered by 10 years ago

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:

01local Player = game.Players.LocalPlayer
02local Char = Player.Character
03local Cam = workspace.CurrentCamera
04 
05local Left = Char:WaitForChild("Left Arm")
06local Right = Char:WaitForChild("Right Arm")
07 
08local FakeL = Left:Clone() --Create Fake arms
09local FakeR = Right:Clone()
10 
11local RightW = Instance.new("Weld",Right) --Weld arms together
12local LeftW = Instance.new("Weld",Left)
13RightW.Part0 = Right
14RightW.Part1 = FakeR
15LeftW.Part0 = Left
View all 25 lines...
0
Line 11,12 are pointless since the clone arm will have the same properties as the Original. UserOnly20Characters 890 — 10y

Answer this question