How to do Charger Ability

Have you seen the Charger from l4d2?, I am trying to recreate it, But i am stuck on the Part where I force the player to Charge/Run Front (I already know to disable controls in any case) , I am unsure What i should do to achieve this please any Method Or solution you have comment it here

1 Like

Hello, the implementation of this depends on whether you’d like the charger to be a player or a bot, so what are you trying to do?

1 Like

Basically is a tool that the player Can Use!

I found this function on the dev hub: Player:Move

You will want to disable the player controls (to prevent the function from being interrupted) and use the code snippet on the bottom to force the player to go in the direction of their camera.
After a set amount of time, you can use player:Move(Vector3.new(0, 0, 0)–to stop them from moving-- and give the player their controls back.

tool.Activated:Connect(function()
    --disable controls
    game.Players.LocalPlayer:Move(Vector3.new(0, 0, -1), true)
    task.wait(3)
    game.Players.LocalPlayer:Move(Vector3.new(0, 0, 0), true)
    -- enable controls
end)

You can of course play around with this by increasing walk speed, manipulating the camera, and adding animations.

1 Like

This sounds good!, I’ll try this out, Any other method is welcome!