Push script not working

Heres the script:

script.Parent.Touched:Connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") then
        local human = hit.Parent:FindFirstChild("Humanoid")
        if human then
	   hit.Parent.HumanoidRootPart.Velocity = script.Parent.CFrame.LookVector * 200
        end
    end
end) 

not sure why its not working and iam using r15

1 Like

I suggest you use BodyVelocity because that exactly what it was meant for to add velocity to a certain body and you can configure the force and all of that

i will try 30 characters…

1 Like

I would put print statements to see if it gets stopped somewhere or if the function is even being called at all. I would also change “if humanoid then” to “if humanoid ~= nil then” and see if there is a change.

Thanks! this is what i made:

1 Like

Thats INSANELY GOOD dude, ive never seen anything like it good work man, keep it up like actually thats very good

1 Like