jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 09 Nov 2013 11:19 PM |
I made fake arms and welded it, when I zoom In, there is just one arm holding the gun, and that is the right arm, I want the left arm to kinda hold the gun also, like cross over and hold the front of the gun, problem is tho, I don't know how
Could someone explain to me how? Would I use from exurler angles or what ever that is? I don't want to build off scripts in free models because I don't trust them. |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 09 Nov 2013 11:29 PM |
Use Welds, CFrame.new(x,y,z)*CFrame.Angles(x,y,z)
And free model scripts are actually very good to use in this case. |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 09 Nov 2013 11:31 PM |
| so i'd position the arms in the way i want and put this inside of them? and edit the coords? |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 09 Nov 2013 11:40 PM |
| Dont position anything.... Just edit the coordinates so that it will end up in the position you want. |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 09 Nov 2013 11:45 PM |
| xyz would be the position I want it in? |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 09 Nov 2013 11:49 PM |
Ya... except the XYZ on a human's arms are a bit tricky to understand... I guess keep fiddling around with numbers until you get it in the right position. It usually takes me 30 min to get it right... |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 10 Nov 2013 12:30 AM |
leftarm.CFrame = CFrame.new(script.Parent.Parent.Character["Left Arm"].CFrame)*CFrame.Angles(-12.643, 4.7, 19.386)
00:28:17.095 - Players.Player1.PlayerGui.leftarm:33: bad argument #3 to 'CFrame' (CFrame expected, got userdata) |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
| |
|
Nagrath99
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 1537 |
|
|
| 10 Nov 2013 12:50 AM |
| I've also been trying to do this and haven't found a way.. |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 10 Nov 2013 12:53 AM |
Here is part of a code for an object I used....
local tool = script.Parent local welds = {} local clear = true local catch = false local totalTime = .6 local frames = 20 local initLP = Vector3.new(-.2, 0.3, -.4) local initLA = Vector3.new(math.rad(110), math.rad(-70), 0) local finalLP = Vector3.new(1, .4, .5) local finalLA = Vector3.new(math.rad(300), math.rad(50), 0) local initRP = Vector3.new(-1, .4, -.6) local initRA = Vector3.new(math.rad(150), math.rad(15), 0) local finalRA = Vector3.new(math.rad(300), math.rad(-15), 0) local finalRP = Vector3.new(-1, .7, .6) function Equip(mouse) wait(0.01) player = game.Players:GetPlayerFromCharacter(script.Parent.Parent) arms = {tool.Parent:FindFirstChild("Left Arm"), tool.Parent:FindFirstChild("Right Arm")} torso = tool.Parent:FindFirstChild("Torso") up = false if arms ~= nil and torso ~= nil then local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")} if sh ~= nil then local yes = true if yes then yes = false local weld1 = Instance.new("Weld") weld1.Part0 = torso weld1.Parent = torso weld1.Part1 = arms[1] welds[1] = weld1 weld1.C1 = CFrame.new(initLP)*CFrame.Angles(initLA.X, initLA.Y, initLA.Z) local weld2 = Instance.new("Weld") weld2.Part0 = torso weld2.Parent = torso weld2.Part1 = arms[2] weld2.C1 = CFrame.new(initRP) * CFrame.Angles(initRA.X, initRA.Y, initRA.Z) welds[2] = weld2 end else print("sh") end else print("arms") end end
tool.Equipped:connect(Equip) |
|
|
| Report Abuse |
|
|
Nagrath99
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 1537 |
|
|
| 10 Nov 2013 01:04 AM |
| *cough* free model! *cough* |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 10 Nov 2013 01:07 AM |
^Sorta. I took a free model script, but I edited it so much that its now mine XD
Lets put it this way. It used to come from a Machine Gun that just stays still. Now its code for a Butterfly net that moves around if you click it.
But free models are an extremely good way to learn how things work. |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 10 Nov 2013 01:24 AM |
i'm still having my error. 01:22:57.959 - Players.Player1.PlayerGui.leftarm:34: bad argument #1 to 'new' (Vector3 expected, got userdata) |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 10 Nov 2013 01:29 AM |
| fixed it, but the arm spawns far away, makes me know how long it will take to actually get it right. |
|
|
| Report Abuse |
|
|
wazap
|
  |
| Joined: 29 Jun 2007 |
| Total Posts: 23234 |
|
|
| 10 Nov 2013 01:31 AM |
Inside CFrame.new(), are you keeping it CFrame.new(blahblah.CFrame)*CFrame.Angles(x,y,z)
If thats the case, make it blahblah.CFrame*CFrame.Angles(x,y,z)
aka you dont need CFrame.new() Either that or CFrame.new(blahblah.CFrame.p)*CFrame.Angles(x,y,z) |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 10 Nov 2013 01:41 AM |
| all the free modeled scripts welded a different way, i welded using the weld tutorial off the wiki so i really don't understand anything in those scripts. |
|
|
| Report Abuse |
|
|
jonesj627
|
  |
| Joined: 06 Oct 2010 |
| Total Posts: 1496 |
|
|
| 10 Nov 2013 01:46 AM |
sure glad i found this tutorial : www.lualearners.org/tutorial&tut=150 |
|
|
| Report Abuse |
|
|