You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m trying to make a Weapon that gets thrown from the Player’s HumanoidRootPart towards the Enemie’s HumanoidRootPart using BodyVelocity. -
What is the issue? Include screenshots / videos if possible!
I’m not sure how to make it throw the weapon towards the enemy.
What I’ve made so far: (Ignore the broken Enemies)
video broke for some reason
local function ThrowWeapon(Weapon, Char, Enemy)
Weapon.Anchored = false
Weapon.CanCollide = false
Weapon.CFrame = Char.HumanoidRootPart.CFrame
Weapon.Parent = game.Workspace
local BodyVelocity = Instance.new("BodyVelocity", Weapon)
BodyVelocity.MaxForce = Vector3.one * math.huge
BodyVelocity.Velocity = Char.HumanoidRootPart.CFrame.LookVector * 60 --Make this throw towards the Enemy
Weapon.Orientation = Vector3.new(Weapon.Orientation.X,Weapon.Orientation.Y, 90)
game.Debris:AddItem(Weapon, 3)
end
Any Help would be nice!