|
| 07 Aug 2011 05:00 PM |
it supposed to move the arm pointing at the mouse's position. so when you zoom in, it should keep in place on one area.
coroutine.wrap(function() while wait() do local x, y, z = mouse.Hit:toEulerAnglesXYZ() char.Torso["Right Shoulder"].CurrentAngle = y end end)()
...HELP |
|
|
| Report Abuse |
|
|
Sorcus
|
  |
 |
| Joined: 29 Nov 2010 |
| Total Posts: 3775 |
|
|
| 07 Aug 2011 05:00 PM |
See the Dracovin's wand :)
~Sorcus |
|
|
| Report Abuse |
|
|
sckum555
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 6576 |
|
|
| 07 Aug 2011 05:01 PM |
"...HELP "
scripter ...HELPers |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 07 Aug 2011 05:02 PM |
coroutine.wrap(function() while wait() do local x, y, z = (mouse.Hit - char.Torso["Right Shoulder"].Position):toEulerAnglesXYZ() char.Torso["Right Shoulder"].CurrentAngle = y end end)()
No idea if that works.
Also y u no just use Spawn() |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 07 Aug 2011 05:06 PM |
["Right Shoulder"].Position? o_O Also, is spawn() more efficient or something? I use coroutines just because I think that it is more powerful. |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 07 Aug 2011 05:07 PM |
Spawn()'s just more concise
Powerfulness means little when you're just going to do what the concise thing does |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 07 Aug 2011 05:10 PM |
CurrentAngle = math.pi / 2 + Mouse.Hit.lookVector.y
Pretty sure there's some trig functions missing there |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
| |
|
Razer100
|
  |
| Joined: 28 Aug 2009 |
| Total Posts: 8066 |
|
|
| 07 Aug 2011 05:12 PM |
Vectors, look, .
think
-R- ~!SS!~ ~ రేజర్ ~ |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 07 Aug 2011 05:13 PM |
| ^I'm not sure what you're trying to say |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 07 Aug 2011 05:14 PM |
"local x, y, z = cframe:toEulerAnglesXYZ()"
Never do this.
NEVER EVER EVER DO THIS
It is never what you actually want. Let me reiterate: it is not what you want. |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
| |
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 07 Aug 2011 05:15 PM |
My last post was, though.
Third time this thread D: |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 07 Aug 2011 05:19 PM |
@Oysi: I'm still gonna go with no. What you should be using is:
var yAngle = math.atan2(lookVector.x, lookVector.y)
I'll modify my statement: :toEulerAngles() only does what you want if you're looking for the Y rotation. Normally. |
|
|
| Report Abuse |
|
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 07 Aug 2011 05:20 PM |
Oops:
var yAngle = math.atan2(lookVector.x, lookVector.z) |
|
|
| Report Abuse |
|
|
thegenius
|
  |
| Joined: 03 Oct 2008 |
| Total Posts: 3838 |
|
|
| 07 Aug 2011 05:23 PM |
Never knew what coroutine.wrap() was. Now, it's awesome.
coroutine.wrap(function() while wait() do print("OLOL") end end)
(Note: Math FTW) |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
NXTBoy
|
  |
| Joined: 25 Aug 2008 |
| Total Posts: 4533 |
|
|
| 07 Aug 2011 05:25 PM |
| Can't tell if genuine, sarcastic, or not aimed at me. |
|
|
| Report Abuse |
|
|