Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

BodyForce will not effect player?

Asked by 5 years ago

I have created this code(shown below), it makesa BodyForce and sets it's Parent as the targets humanoid however nothing happens.

local event = game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("FlingHandler")



event.OnServerEvent:Connect(function(Player,hit)
    local Force = Instance.new("BodyForce")
    local Look = Player.Character.HumanoidRootPart.CFrame.LookVector
    Force.Force = Look*8000
    Force.Parent = hit.Parent.Humanoid
    wait(.25)
    Force:Destroy()
end)
1
The parent of a BodyForce should be some kind of part, not a humanoid. You should therefore parent it to the HumanoidRootPart which can be found in the character User#24403 69 — 5y
0
Force.Parent = hit.Parent.HumanoidRootPart yHasteeD 1819 — 5y
0
Still did nothing. Thunder878712817 -6 — 5y
0
Check if the hit.Parent.HumanoidRootPart is not anchored yHasteeD 1819 — 5y
View all comments (4 more)
0
it can also be being destroyed very quickly. try to put wait(0.5) or wait(0.7) or more, if solved your problems put [SOLVED] in title yHasteeD 1819 — 5y
0
When you hit someone with your hammer it runs this code, which it does, but there are no signs of the Force actually doing anything, but it is Parented to HumanoidRootPart Thunder878712817 -6 — 5y
0
put the script of fire the event in message, with get the hit. yHasteeD 1819 — 5y
0
Getting the hit is a localscript though Thunder878712817 -6 — 5y

Answer this question