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

How do I thrust character forward in the direction they are facing? [closed]

Asked by 6 years ago

So I have a LocalScript inside the Handle for a tool that when you click, the player moves forrward whilst doing an animation. I've been checking out velocity, BodyThrust, and BodyForce, but I can't seem to make it so the player thrusts forward in the direction they're FACING. Here's the code:

local tool = script.Parent.Parent
local Player = game.Players.LocalPlayer
--This attack will thrust the character forward,making their uppertorso deadly
local debounce = false
local toggle = false

tool.Activated:Connect(function()


if toggle == false then
toggle = true

local force = Instance.new("BodyVelocity")
force.Parent = Player.Character.HumanoidRootPart
force.MaxForce = Vector3.new(5000,5000,5000)
force.Velocity = Vector3.new(0,0,5000)
wait(.5)
force:Destroy()
end 
wait(.2)
toggle = false

end)

Marked as Duplicate by Goulstem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?