Zorbon61
|
  |
| Joined: 05 Jun 2012 |
| Total Posts: 321 |
|
|
| 26 Jan 2015 05:10 PM |
local mouse = lp:GetMouse() mouse.Move:connect(function() if char then if torso then local rotation = Vector3.new(mouse.Hit.p.X, 0, mouse.Hit.p.Z) torso.CFrame = CFrame.new(torso.Position, rotation) end end end)
How do I make it so my character stand up straight at all times instead of his torso looking down/up? I don't get it, I set the Y to 0... Any help is appreciated! |
|
|
| Report Abuse |
|
|
Zorbon61
|
  |
| Joined: 05 Jun 2012 |
| Total Posts: 321 |
|
| |
|
Zorbon61
|
  |
| Joined: 05 Jun 2012 |
| Total Posts: 321 |
|
|
| 26 Jan 2015 06:12 PM |
In case anybody is confused, the issue is within the scripts;
local rotation = Vector3.new(mouse.Hit.p.X, 0, mouse.Hit.p.Z) torso.CFrame = CFrame.new(torso.Position, rotation)
Instead of my guy walking straight like a normal guy, his whole body will look towards my mouse cursor. I don't understand why he just turns towards it, rather than his body leaning towards (and sometimes floating when cursor is under him) the cursor.
Imagine it like this, I want him to stand straight | rather than slanted / or in a case where the cursor is under him, completely horizontal -
Why is the Y being changed from 0? |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 06:35 PM |
| local rotation = Vector3.new(mouse.Hit.p.X, 5, mouse.Hit.p.Z) --Try this instead |
|
|
| Report Abuse |
|
|
|
| 26 Jan 2015 06:36 PM |
| local rotation = (somethin,torso.Position.Y,somethin) |
|
|
| Report Abuse |
|
|
Zorbon61
|
  |
| Joined: 05 Jun 2012 |
| Total Posts: 321 |
|
|
| 26 Jan 2015 06:38 PM |
| Just tried that, I also attempted using 4. They were both pretty good, however when the cursor got close to the character, the character flipped out. Hmmm |
|
|
| Report Abuse |
|
|
Zorbon61
|
  |
| Joined: 05 Jun 2012 |
| Total Posts: 321 |
|
|
| 26 Jan 2015 06:40 PM |
| Thanks a ton iwishforpie1! Didn't think of that. Thanks again! |
|
|
| Report Abuse |
|
|
| |
|