game.ReplicatedStorage.UppercutEvent.OnServerEvent:Connect(function(plr)
spawn(function()
plr.Character.Humanoid.WalkSpeed = 0
task.wait(.25)
plr.Character.Humanoid.WalkSpeed = 16
end)
local hitbox = Instance.new("Part")
hitbox.Parent = workspace
hitbox.CanCollide = false
hitbox.Anchored = true
hitbox.Size = Vector3.new(6,6,6)
hitbox.BrickColor = BrickColor.new("Really red")
hitbox.Transparency = .8
hitbox.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,-3)
game.Debris:AddItem(hitbox,.5)
local character = plr.Character
local hitboxCooldown = false
hitbox.Touched:Connect(function(hit)
if hit.Parent.Name ~= plr.Name and hit.Parent:FindFirstChild("Humanoid") then
if hitboxCooldown == true then return end
hitboxCooldown = true
hit.Parent:FindFirstChild("Humanoid"):TakeDamage(10)
local target = hit.Parent:FindFirstChild("HumanoidRootPart")
local BV = Instance.new("BodyVelocity")
BV.P = math.huge
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = character:FindFirstChild("HumanoidRootPart").CFrame.lookVector * 30
BV.Parent = target
game.Debris:AddItem(BV, 0.5)
task.wait(1)
hitboxCooldown = false
end
end)
end)
How would one make the Body Velocity knockback go up while still being based off the camera