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

How to check what direction is 'forwards'?

Asked by
Uroxus 350 Moderation Voter
7 years ago
Edited 7 years ago

So I've got a script that moves a model based on the PrimaryPart 'backwards' and 'forwards' (Moving along one axis...) Tomorrow I'll be figuring out how to make the thing turn left and right which would mean that the current axis I'm adding to and subtracting from to make this part move 'forwards' would no longer work.. instead this would make it go side to side.

How would I detect what axis I'd have to move along for it still to travel along the axis which it is facing without it being effected by the rotation?

0
You can base the humanoid :move() function off of the camera angle, so it'll move the direction the camera is facing. GoldenPhysics 474 — 7y
0
@GoldenPhysics I've looked up on this and implement it but the output just says "Move is not a valid member of Part"..? Uroxus 350 — 7y
0
Move is a function that you use on the Humanoid. Huamnoid:Move(Direction). Another option would be moving the model based on the Torso Look Vector, which is a direction. Humanoid:Move(Torso.CFrame.lookVector) User#11440 120 — 7y

Answer this question