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

How do I detect if the Touched event occurs on the left,right or front of the humanoid?

Asked by 5 years ago
Edited 5 years ago

Sorry for any English mistakes.

I'm trying to do a Wall jump script,but i don't know how to detect if the wall is on the right,left or front of the humanoid.I need that because of the animations and because of the velocity i want to put in the opposite direction of the wall.

0
You could check the HumanoidRootPart's CFrame for doing this. You can check their LookVector and RightVector. DeceptiveCaster 3761 — 5y
0
^, when the touched event fires, check if the part is closest to the lookvector, the rightvector, the left vector (negative rightvector), and the back vector (negative lookvector). Fifkee 2017 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

Well, just have 3 different functions for the touch, one in the Humanoid RightArm, Humanoid LeftArm, and Humanoid Torso. However with R15 you will have to get the names of the different joint parts.

0
I used the parameters of the Touched function to only activate if the touching limb of the humanoid is the leftupperarm,rightupperarm etc. extroias 16 — 5y
0
Exactly what my answer meant! (I hope that didn't sound like I was A N G E R Y) Sk3pticalR0BL0X 33 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Now, I am fairly decent to scripting, so I may be wrong.

Now, if the wall isn't moving, you can have variables like inFront, left, and right, equal to true if when the player hits the wall, if the position of the wall is equal to the position you like, left, right, or inFront can be called as true.

0
Well, just have 3 different functions for the touch, one in the Humanoid RightArm, Humanoid LeftArm, and Humanoid Torso. However with R15 you will have to get the names of the different joint parts. Sk3pticalR0BL0X 33 — 5y

Answer this question