vShanksv
(Shanks)
July 8, 2021, 2:40am
1
What I have accomplished
local BV = Instance.new("BodyVelocity")
BV.Parent = EnemyRoot
BV.MaxForce = Vector3.new(1,1,1) * 25000
BV.Velocity = Vector3.new(0,-100,0)
game.Debris:AddItem(BV,0.3)
This breaks them down on the Y axis which is always accurate but depending on where the player is facing if I gave the zed a negative number it wont move it in the correct place depending on where I’m facing.
Please help do not ignore this post if you know how
The Velocity property is not relative to the parent (it’s relative to world space). You can fix this by multiplying it by the parent’s LookVector.
local BV = Instance.new("BodyVelocity")
BV.Parent = EnemyRoot
BV.MaxForce = Vector3.new(1,1,1) * 25000
BV.Velocity = Vector3.new(100,0,0) * BV.Parent.CFrame.LookVector
game.Debris:AddItem(BV,0.3)
vShanksv
(Shanks)
July 8, 2021, 3:19am
3
BV.Velocity = Vector3.new(0,-100,-45) * BV.Parent.CFrame.LookVector doesnt work
Tidyen
(Tidyen)
July 8, 2021, 8:20am
4
What are you using this body velocity instance for?
1 Like
vShanksv
(Shanks)
July 8, 2021, 4:11pm
5
So I am working on a air combo and when I smash you down to the ground I want you moving down on the Y axis and moving forward on the Zed axis.