|
| 13 Aug 2015 02:39 AM |
| how would I make the players right shoulder rotate right of the torso? |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 02:51 AM |
local Motor6D = DirectoryHere local OriginalC0 = Motor6D.C0 for i = 0, 1, 0.1 do Motor6D.C0 = Motor6D.C0:lerp(OriginalC0 * CFrame.Angles(math.rad(X), math.rad(Y), math.rad(z)) wait() end |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 03:06 AM |
am I meant to change math.rad(X),math.rad(Y),math.rad(Z) to anything?
local Motor6D = workspace.Dummy.Torso["Right Shoulder"] local OriginalC0 = Motor6D.C0 for i = 0, 1, 0.1 do Motor6D.C0 = Motor6D.C0:lerp(OriginalC0 * CFrame.Angles(math.rad(X), math.rad(Y), math.rad(Z))) wait() end
>>> bad argument #1 to 'rad' (number expected, got nil) |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 03:25 AM |
| Isn't it obvious? You're supposed to change X Y Z to a number :P |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 03:51 AM |
local Motor6D = workspace.Dummy.Torso["Right Shoulder"] local OriginalC0 = Motor6D.C0 for i = 0, 10, 0.1 do Motor6D.C0 = Motor6D.C0:lerp(OriginalC0 * CFrame.Angles(math.rad(1), math.rad(1), math.rad(i))) wait() end
nothing happened |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 13 Aug 2015 03:55 AM |
local Motor6D = workspace.Dummy.Torso["Right Shoulder"] local OriginalC0 = Motor6D.C0 for i = 0, 1, 0.1 do Motor6D.C0 = Motor6D.C0:lerp(originalC0 * CFrame.Angles(0, 0, math.rad(45)), i) wait() end
try that? you may notice something idk lel
i can't test it as of now |
|
|
| Report Abuse |
|
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 13 Aug 2015 03:59 AM |
local Motor6D = workspace.Dummy.Torso["Right Shoulder"] local OriginalC0 = Motor6D.C0 for i = 0, 1, 0.1 do Motor6D.C0 = OriginalC0:lerp(originalC0 * CFrame.Angles(0, 0, math.rad(45)), i) wait() end
my bad, try that
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 04:00 AM |
| 4 values? 0,0,math.rad(45),i? |
|
|
| Report Abuse |
|
|
| |
|
instawin
|
  |
| Joined: 04 Jun 2013 |
| Total Posts: 8777 |
|
|
| 13 Aug 2015 04:05 AM |
look up what :lerp() takes for its arguments. it takes the desired endCFrame, and the alpha. alpha is sorta like a fraction that represents the progress of interpolation. 0 being the startPoint, 1 being the endCFrame. for example, to get a part halfway between the end cframe, just do this:
part.CFrame = part.CFrame:lerp(part.CFrame.lookVector * 6, .5) would be 3 studs ahead of the part's original CFrame i believe
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 04:33 AM |
I tried
frames = {0,45,50}
local Motor6D = workspace.Dummy.Torso["Right Shoulder"] local OriginalC0 = Motor6D.C0
for i = 1, #frames do for x = 0, 1, .5 do Motor6D.C0 = OriginalC0:lerp(OriginalC0 * CFrame.Angles(0, 0, math.rad(frames[i])), x) wait() end end
but every next frame it starts from 0
|
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 06:24 AM |
I suggest u use C1 for all the animating and stuff, and in this case, it will be CFrame.Angles(math.rad(45), 0, 0) cos on the C1 it will be like so X Axis = Across, as if pointing at something when it's going past u. Y Axis = Roll, like when u think of what u want to do, underhand pull ups (chin ups) or overhand pull ups. Z Axis = Lift the arm up, as if ur equipping a tool.
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 09:01 AM |
frames = {0,45,50}
local Motor6D = workspace.Dummy.Torso["Right Shoulder"] local OriginalC1 = Motor6D.C1
for i = 1, #frames do for x = 0, 1, .5 do Motor6D.C1 = OriginalC1:lerp(OriginalC1 * CFrame.Angles(0, 0, math.rad(frames[i])), x) wait() end end
same, it goes to 45 then to get to 50, it starts from 0 again |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 09:42 AM |
o.O goes to 45 and starts from 0?
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 09:59 AM |
so its meant to go
0, then 45, then 50
but it goes 0, 45, 0, 50 |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 10:06 AM |
"for x = 0" change that :P
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Aug 2015 10:13 AM |
anything... I noticed it's 1, .5 and if it starts at 0 then that would mean that it loops 3 times, so just for x = 1, 3 do :P
"My Life is going Good... but..." |
|
|
| Report Abuse |
|
|