|
| 13 Aug 2015 02:20 PM |
This script allows my characters' torso to look or "face" the direction of my mouse. But sometimes, depending on where I move my mouse, it'll makes my body fly all over the baseplate. How can I fix this code? This script is located in the Handle of a tool.
script.Parent.Parent.Equipped:connect(function (mouse) mouse.Move:connect(function () local t = script.Parent.Parent.Parent.Torso; t.CFrame = CFrame.new(t.Position, mouse.Hit.p); end); end); |
|
|
| Report Abuse |
|
|
Zaxerion
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 2304 |
|
|
| 13 Aug 2015 02:23 PM |
script.Parent.Parent.Equipped:connect(function (mouse) mouse.Move:connect(function () local t = script.Parent.Parent.Parent.Torso; t.CFrame = CFrame.new(mouse.Hit.p.X,t.CFrame.p.Y,mouse.Hit.p.Z); end); end);
try that?
Zaxerion/McChicken72, iSpecializinq, TheNewChicken, alot of others. Add approx 5k posts. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 02:38 PM |
| Hmm. It made me teleport to places unknown whenever my mouse moved. Bump? |
|
|
| Report Abuse |
|
|
Zaxerion
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 2304 |
|
|
| 13 Aug 2015 02:45 PM |
script.Parent.Parent.Equipped:connect(function (mouse) mouse.Move:connect(function () local t = script.Parent.Parent.Parent.Torso; t.CFrame = t.CFrame*CFrame.Angles(mouse.Hit.p.X,t.CFrame.p.Y,mouse.Hit.p.Z); end); end);
Zaxerion/McChicken72, iSpecializinq, TheNewChicken, alot of others. Add approx 5k posts. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2015 02:54 PM |
| ^ Made me rotate 360 degrees in every axis. Grateful that you're helping. Bump. |
|
|
| Report Abuse |
|
|
Zaxerion
|
  |
| Joined: 09 Feb 2013 |
| Total Posts: 2304 |
|
|
| 13 Aug 2015 03:08 PM |
sorry
Zaxerion/McChicken72, iSpecializinq, TheNewChicken, alot of others. Add approx 5k posts. |
|
|
| Report Abuse |
|
|