I’m using this code for a weapon system that applies a backspin to whoever is hit. Right now, it only applies a backspin on the x-axis of the character’s humanoid root part.
The backspin effect will only look correct when the player is hitting them in a specific direction. In other directions, it will look like the character has a forward spin or a spin that doesn’t go with the direction the player is aiming at.
I'm bad at explaining so here's an analogy
Whenever we shoot a basketball, we create a backspin on it.
We will always create a backspin depending on the direction and the movement of our arms and hands. It won’t make sense if we shoot the ball expecting a backspin on it, but instead spins in a different way.
How could I change the CFrame value of the body gyro, so that the character who was hit will always apply a backspin depending on another character’s direction? Any help is appreciated!
local bodyGyro = Instance.new("BodyGyro")
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bodyGyro.P = 10000000
bodyGyro.Parent = hitParentHRP
bodyGyro.CFrame = hitParentHRP.CFrame * CFrame.Angles(10000, 0, 0)
Debris:AddItem(bodyGyro, 0.1)