Humanoid root part look vector being weird

The y axis is giving infinite values no matter where a person looks at this in return is causing a script to check if a player is behind another player to break.
The only script that changes anything about player is a script that sets the parent of the player to a folder called “Live”
Does anyone know how to solve this?
image

1 Like

I don’t really get what the probleme , on the screen there no infinite value
-9.5e-08 is not infinite this is a very close to 0 number

the problem is the the player is not looking at -9.592636018851408e-08 :sweat_smile:

This is exactly where the player is looking. It’s a value really close to 0 but in scientific notation (with e).

use math.floor() function to decrease amount of numbers

its not, and the proof is that when i try to get the dot product of the player looking at the npc, it gives weird numbers that have nothing to do with where the player is looking at, soo it always says the player is infront of the npc even when its behind

1 Like

ok i will try that but im 99999999999% sure it wont change much

2 Likes

it didn’t work and the script that checks if the player is behind another player is still malfunctioning, ik its the look vector causing the trouble and not the script as i checked the values and the look vector is still giving weird results

That’s not an infinite value, that’s what is referred to as an infinitesimal, an infinitely small decimal value (around 0).

1 Like

yea but it im still having the issue where i can hit players that are blocking while not behind them

the dot product is supposed to be between 0 and -1 while behind the player, instead it gives random numbers like 1 and 2, i will check if the cause is the starter character (although i used roblox animator thing to create it), doubt it is the code since i tried many many codes that worked for literally everyone else and im the only one having that issue

i fixed it by creating a new starter character, now it gives the right look vector, for example: -1,0,1

1 Like