|
| 04 Jan 2015 11:04 AM |
wait() Tool=script.Parent CP,Torso,g=nil,nil,nil necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) getPos=function(Pos,TorsoPos) return Vector3.new(Pos.x,TorsoPos.y,Pos.z) end Turn=function(mouse,Torso,Gyro) g.cframe=CFrame.new(Torso.Position,getPos(mouse.Hit.p,Torso.Position)) offset=(Torso.Position.y-mouse.Hit.p.y)/100 mag=(Torso.Position-mouse.Hit.p).magnitude/80 offset=offset/mag neck=Torso.Neck neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0) arm=Torso:FindFirstChild("Right Shoulder") if arm~=nil then arm.C0=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)*CFrame.fromEulerAnglesXYZ(0,0,-offset) end end Equi=function(mouse) wait(.2) CP=Tool.Parent Torso=CP.Torso g=Instance.new("BodyGyro") g.P=18000 g.D=600 g.maxTorque=Vector3.new(80000,80000000,80000)*50000000000000000000000000 g.cframe=Torso.CFrame g.Parent=Torso while true do if Tool.Parent.className~="Model" then break end Turn(mouse,Torso,g) wait() end Torso.Neck.C0=necko g:Remove() end Tool.Equipped:connect(Equi)
can anyone tell me plz wats he doing in all those lines??? I only get a piece of it :/ cos it's so messy :/ |
|
|
| Report Abuse |
|
|
Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 04 Jan 2015 11:08 AM |
lol... that's an FPS script? It's the worst one I've ever seen. Even though mine is 24 lines. lel
The Awoken | Releasing in April |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 11:09 AM |
| yeah, if u read my Post properly, am saying 'he' not 'me' so it's not my Script :P |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 11:10 AM |
@ruin lol, in my framework I'm doing aiming in about six lines the calculations are only two, though
logic is logical |
|
|
| Report Abuse |
|
|
Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 04 Jan 2015 11:15 AM |
Define aiming though Do you mean Aim Down Sights?
cuz here's my FPS script in general without defining things.
tool.Equipped:connect(function(mouse) equipped = true wait(.2) game:GetService('RunService').RenderStepped:connect(function() if sprinting == false and equipped then local angle = CFrame.new(char.Head.Position, mouse.Hit.p).lookVector.Y neck.C0 = CFrame.new(0, 1.5, 0) * CFrame.Angles(math.asin(angle), 0, 0) end end) end)
The Awoken | Releasing in April |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 11:33 AM |
| looks pretty neat, especially compared to that one... |
|
|
| Report Abuse |
|
|
Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 04 Jan 2015 11:34 AM |
Doesn't have all the defining though.
The Awoken | Releasing in April |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 11:35 AM |
oh, didn't I give you that ruin?
logic is logical |
|
|
| Report Abuse |
|
|
Ruinable
|
  |
| Joined: 14 Sep 2014 |
| Total Posts: 8903 |
|
|
| 04 Jan 2015 11:39 AM |
You might have given me one awhile back, but it wasn't working. I made this one from scratch. I had arms welded to my torso. AND my head. lel.
The Awoken | Releasing in April |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 11:46 AM |
| btw, can anyone tell me, wats the Difference between math.asin and math.rad? |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 12:04 PM |
Math.asin is used in trigonometry to find angles in a right angled triangle. Math.asin is usually known as sin -1.
Math.rad essentially just converts an angle in degrees into radians. |
|
|
| Report Abuse |
|
|
|
| 04 Jan 2015 12:26 PM |
hmmm... thnx...
btw, I remember messing around with some Animations, I used math.rad() and the Arm kinda didn't Rotate Normally... it Rotated from one of it's edges if ya know wat I mean... so does math.asin rotate the Arm (or part) from the Middle of itself? tell me if u dont get me, I'll Upload a few Pics to show u wat I mean |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 Jan 2015 03:07 PM |
img u r . com /E1Uokl7
Number 1. has the Center Point of Rotation on it's Corner, Number 2. has it's Center Point of Rotation in the Center of itself...
so am guessing math.rad would be 1. and math.asin is 2. am guessing... am I right??? |
|
|
| Report Abuse |
|
|