I’m trying to make this script:
script.Parent:SetNetworkOwner(nil) -- if you don't do this the physics goes wack when you transfer
local velocity = 50 -- easier to change in the future
local debounce = false
function kick(hit)
if not debounce then
local players = game:GetService("Players")
if players:GetPlayerFromCharacter(hit.Parent) and
hit.Parent:FindFirstChild("HumanoidRootPart") then
script.Parent:ApplyImpulse(hit.Parent.HumanoidRootPart.CFrame.LookVector
* velocity* script.Parent:GetMass())
debounce = true
wait(1)
debounce = false
end
end
end
script.Parent.Touched:Connect(kick)
Work on a jeep:

The large semi-transparent cube is the hitbox:

Please help me transfer over the script so that when the jeep hits the ball it will kick it.