|
| 26 Apr 2013 11:07 AM |
Okay, so using a LocalScript, I've made it Clone the Arms of your player and Into the tool, but now, how would i make them, Follow where you're aiming in first Person, E.g the Weapon and Arms go Up, when you look Up,
http://www.roblox.com/Compound-place?id=56243423
just like in that place
any help would be appreciated. ~ Band
|
|
|
| Report Abuse |
|
|
ohno1112
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 833 |
|
| |
|
|
| 26 Apr 2013 11:16 AM |
How would I go about using CameraVector, Example please? (I'm not experienced with Camera Things, Just CFrame Animations, and NPC's not really done anything Player sided before :P) |
|
|
| Report Abuse |
|
|
neongoo51
|
  |
| Joined: 12 May 2009 |
| Total Posts: 33061 |
|
|
| 26 Apr 2013 11:56 AM |
If you're experienced with CFrame animations, then you should know how to use LookVectors. I think it has something with that to do.
{ERROR: Signature.exe not found} |
|
|
| Report Abuse |
|
|
|
| 26 Apr 2013 12:02 PM |
| I Can make an Object, (Model) Rotate and Spin(Cycle) around another Object, using LookVectors, but that Is as far as I can go with them. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
Bloxyhead
|
  |
| Joined: 12 Oct 2009 |
| Total Posts: 52 |
|
|
| 27 Apr 2013 02:46 AM |
haha im doing something like that right now, except how are you doing it? im kind of using like the traditional ways of arm welding, like you know those popular gun scripts: weld33.C1 = CFrame.Angles(blah,blah,blah) stuff like that and im making so that in a loop the up down angles change based on the cameravector (hint: it uses math.sin)
but in a lot of other games, they pretty much just clone heads and arms, from a model, weld them together, and literally have them point wherever your mouse is pointing, like move them all at once, which is convenient for them i guess its ok in fps i know that because i look in uncopylocked games but anyways
my way is kind of wierd i guess |
|
|
| Report Abuse |
|
|
Bloxyhead
|
  |
| Joined: 12 Oct 2009 |
| Total Posts: 52 |
|
|
| 27 Apr 2013 04:17 AM |
k guys im done, turns out it actually uses atan2 and mouse.hit it looks really wierd tho, so... you prob dont want to use it otherwise it works
function onEquipped(mouse2) mouse = mouse2 wait(0.1) vChar = script.Parent.Parent larmweld = Instance.new("Weld") rarmweld = Instance.new("Weld") lsh = vChar.Torso:findFirstChild("Left Shoulder") rsh = vChar.Torso:findFirstChild("Right Shoulder") if lsh ~= nil and rsh ~= nil then lsh.Part1 = nil rsh.Part1 = nil end larmweld.Part0 = vChar.Torso larmweld.Parent = vChar.Torso larmweld.Part1 = vChar:findFirstChild("Left Arm") rarmweld.Part0 = vChar.Torso rarmweld.Parent = vChar.Torso rarmweld.Part1 = vChar:findFirstChild("Right Arm") coroutine.resume(coroutine.create(function() while wait(0.1) do getWeldDirection(mouse) end end)) end
function getWeldDirection(mouse) if not dug_in and sprint_on then local dir = (mouse.Hit.p - script.Parent.Parent.Head.Position).unit local tilt = math.deg(math.atan2(dir.y,Vector3.new(dir.x,0,dir.z).magnitude)) larmweld.C1 = CFrame.new(-0.35, 0.6, 0.6) * CFrame.Angles(math.rad(290), math.rad(0 + tilt), math.rad(-90)) rarmweld.C1 = CFrame.new(-1, 0, 0.6) * CFrame.Angles(math.rad(-90 - tilt), 0, 0) end end
i might actualy change the welding a bit, to like some other new, generated part, but aside from that, have fun using my low-production value extrmely inefficient script |
|
|
| Report Abuse |
|
|
|
| 27 Apr 2013 02:40 PM |
| Thanks, but I already solved it, I had to make it slighty different, due to the Player's Arms having 2 blocks each, (They Have ElBows in my game) xD but thank you anyway, for posting the script, so others can use it :) |
|
|
| Report Abuse |
|
|
|
| 26 Sep 2013 06:48 PM |
| Is that a local script or just a script? |
|
|
| Report Abuse |
|
|