local Tool = script.Parent
local Player = Tool.Parent.Parent
local Character = Player:WaitForChild("Character")
local Humanoid = Character.Humanoid
local KnockbackSpeed = 135
Tool.Handle.Touched:Connect(function(hit)
if hit and hit.Parent == Player.Character then return end
if hit and hit.Parent:FindFirstChild("Humanoid") then
local hum = hit.Parent:FindFirstChild("Humanoid")
local bv = Instance.new("BodyVelocity")
bv.Parent = hum.Parent.HumanoidRootPart
bv.Velocity = Player.Character.HumanoidRootPart.CFrame.lookVector * KnockbackSpeed
bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
game.Debris:AddItem(bv,.4)
end
end)
COMMUNITY QUESTION
Why won't the Humanoid get knocked back when touched by the handle?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
