Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make the humanoid move with a different side of the model facing forward?

Asked by 7 years ago
Edited 7 years ago

Hey, so I've created a sheep model for a game I'm working on and I've set it up with a humanoid and it's doing everything I want it to except that when it moves, the model moves sideways instead of forward-facing like I'd prefer it to. Is there an issue with the way I have the model?

Is there a way to tell the humanoid to fix itself with one side of the model being the front or is that pre-determined just by how the model is made?

I've realized it has something to do with the orientation of the torso but I don't know how to fix it without having to rebuild the entire model from scratch, which would be hard because I'm using a mesh for the torso to give it a better wool-looking shape.

Any help or tips or suggestions or questions would be greatly appreciated!

EDIT

@legomaster38

I can't think what kind of code would be useful in this context because the script does exactly what I expect it to. The sheep moves and reacts just like I expect it to but whenever I move the sheep via the humanoid:MoveTo function, the entire model moves towards the player with its side facing towards the player instead of the head (or the front).

Here is a few tidbits from a few of the scripts involving movement.

            repeat
                local followerPosition = hit.Character.PrimaryPart.Position

                humanoid:MoveTo(followerPosition - Vector3.new(0, 0, -5))
                wait()
            until isRedSheep == false

and

local humanoid = script.Parent:FindFirstChild("Humanoid")

humanoid.LeftLeg = script.Parent:FindFirstChild("Left Leg")
humanoid.RightLeg = script.Parent:FindFirstChild("Right Leg")
humanoid.Torso = script.Parent:FindFirstChild("Torso")

while true do
    wait()
    script.Parent:FindFirstChild("Plumbob").Position = (script.Parent:FindFirstChild("Head").Position + Vector3.new(0, 5, 0))
end

and finally

local humanoid = script.Parent:FindFirstChild("Humanoid")

repeat
    humanoid:MoveTo(script.Parent.PrimaryPart.Position - Vector3.new(math.random(-15, 15), 0, math.random(-15, 15)))
    wait(3)
until false
0
A view with your script would be nice, that way we could figure out what you need help with exactly. legomaster38 39 — 7y
0
Edited above, as per your request. DavidNate1 10 — 7y

Answer this question