#Why does my backstab code doesn't work? It just damages the normal damage (1 dmg).
1 messages · Page 1 of 1 (latest)
local angle = hitboxLookVector:Angle(rootPartLookVector)
directionMultiplier = math.sign(angle - math.pi/2)
This is code I used to know which side to open a door from
ye
what is that?
math.sign(angle - math.pi/2)
Basically, angle will return a value between 0 and math.pi (3.14)
anyways changed it and now only backstabbing i guess i need help again
how do i implement it?
leftGateHinge.TargetAngle = 90 * -directionMultiplier
rightGateHinge.TargetAngle = 90 * directionMultiplier
this is for my gates
Represents a 3D value with a direction and magnitude.
i'll look now
okay so i need angles
but
i dont really know what to write right now
ill try doing if -90 if elseif 90
Vector3:Angles() is the same thing as math.acos(vector1:Dot(vector2))