Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
|
| 02 Aug 2016 09:01 PM |
I have an NPC pet I made using a Humanoid. Basically, it has 2 parts, a MeshPart called Torso, and a Head, which is .99 Transparency and .1x.1x.1 size, and it's welded to the Torso to hold it in place. The NPC works fine, except for when I call MoveTo in the script I posted below. The NPC walks backwards, sideways, and hardly ever forwards. How can I make it so it only walks forwards? I tried rotating the Torso by 90 degrees 180 degrees and 270 degrees with no avail.
local sp = script.Parent local torso = sp.Torso local humanoid = sp.Humanoid local owner = script.Parent.Owner
while wait(.1) do if owner.Value ~= "Unclaimed" then local find = game.Players:FindFirstChild(owner.Value) if find ~= nil and find.Character.Torso.Velocity.X ~= 0 then local chr = find.Character local cTorso = chr.Torso humanoid:MoveTo(cTorso.Position + cTorso.CFrame.lookVector * -10) end end end
-iJava |
|
|
| Report Abuse |
|
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
| |
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
| |
|
|
| 02 Aug 2016 09:48 PM |
| I think your problem is that the torso's literal front side appears as a lateral side to you. A way to fix this would be to switch the torso's size dimensions so tht the width->length and length->width. |
|
|
| Report Abuse |
|
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
| |
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
| |
|
|
| 02 Aug 2016 10:38 PM |
Say you have a part:
[_____] <-Front side
Shrink it like this:
[_] <~~~
Then lengthen it like so: _ | | | | | | <-Front side | | | | | V
Now it should look like the original 'cept the front side's longer |
|
|
| Report Abuse |
|
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
|
| 02 Aug 2016 10:54 PM |
Will that work with a MeshPart?
-iJava |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2016 11:01 PM |
| Yeah, unless you have something else used to differentiate the front from the other sides. |
|
|
| Report Abuse |
|
|
Widths
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 41286 |
|
|
| 02 Aug 2016 11:02 PM |
Won't that completely distort the mesh though?
-iJava |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2016 11:09 PM |
| Oh. That's what you meant lol. Maybe you could make another invis part act as the Torso? |
|
|
| Report Abuse |
|
|