So im trying to make an ability that leaves an area, when the area makes contact with a projectile, the projectile freezes, a short delay of time happens and then the projectile is unfreezed and goes the opposite direction, i scripted the freezing part and the delay but now that i have to script the reversing part i’m wondering: “How could i invert the Velocity value on the BodyVelocity?” and i can’t seem to work out how, any help is greatly appreciated.
1 Like
well it depends on how you do the velocity of the projectile.
Heres an example:
BV.Velocity = projectile.CFrame.LookVector * power--Projectile OR the players HRP
This would make the projectiles velocity move infront of the player. So the direction is foward. power being a number that determines how fast the projectile is
You can simply do something like this to reverse the velocity
--check to see if the projectile enters the specific area
BV.Velocity = projectile.CFrame.LookVector * -50 --Will make it go backwards.
this is how i usually work with BodyVelocities. If you need any help feel free to ask!
Hope this helps!