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

(SOLVED) BodyAngularVelocity applying rotation to a ball in the wrong direction?

Asked by
lolzmac 207 Moderation Voter
4 years ago
Edited 4 years ago

I have a ball, and upon kicking it, the ball should kick in the direction a player is facing, but spinning backward. However, instead of spinning backwards, the ball is rotating to the right, making the ball bounce to the right. I'm using the negative lookVector of the torso so it should theoretically spin in the opposite direction that the player is facing (I believe), but it's not. Here's the code:

A = Instance.new("BodyAngularVelocity")
A.AngularVelocity = (Player.Character["Torso"].CFrame.lookVector) * math.rad(720)
A.Parent = hit
game.Debris:AddItem(A, .3)

1 answer

Log in to vote
0
Answered by
lolzmac 207 Moderation Voter
4 years ago

Using RightVector instead of lookVector resolved the issue. Solved

Ad

Answer this question