|
How do I get the players arms to follow the mouse based on the y axis? This is what I tried (left arm and right arm are variables for c0s), but it always points the gun down (when aiming)
RightArm = CFrame.new(0,0.5,0.15) * CFrame.Angles(math.rad(Mouse.Hit.p.Y/5),0,0);
LeftArm = CFrame.new(-0.825,0.35,-1.25) * CFrame.Angles(math.rad(Mouse.Hit.p.Y/5),0,0.4); |
|
|
Check out the pose tool
MomoiroCloverZ, newbag expert Lua coder. |
|
|
I'm using models for guns and hopper bins for tools. I don't think I can use that (honestly don't know what you're referring to) |
|
|
|
MHebesJoin Date: 2013-01-04 Post Count: 2278 |
Well I haven't checked your math, but that's not how variables work.
If you said
local t = Workspace.Part.Transparency
, t would now equal the number '0.5' or whatever. If you then said:
t = 0.9
, you're only changing the variable: the part would remain unchanged. |
|
|
Then which property would I use to make it update the angles? |
|
BLOXLUAJoin Date: 2013-03-16 Post Count: 453 |
PART.Potato |
|
MHebesJoin Date: 2013-01-04 Post Count: 2278 |
Still C0, but you can't have
RightArm = weld.C0
and then try to change the C0 by just resetting RightArm. You need to do
weld.C0 = CFrame.new()
in order to change the actual property. |
|
|
I don't want another BUMPy thread. Serious answers? :P |
|
|
@Meh
All of the other animations work when I do RightArm = CFrame.new();
But it has follow following the mouse. why is this |
|
|
|
MHebesJoin Date: 2013-01-04 Post Count: 2278 |
I'm telling you, just saying "RightArm = CFrame.new(0,0.5,0.15) * CFrame.Angles(math.rad(Mouse.Hit.p.Y/5),0,0);" does nothing, unless somewhere afterwards you say RightShoulder.C0 = RightArm |
|
|
|
I do. At the end, I say
Motor1.C0 = CLerp(Motor1.C0, RightArm, NewSpeed); |
|
|
|
|
|
|