I’m not quite sure exactly what your problem is but the vectorVelocity is set to be very high which causes the velocity to be stronger. Also, if you are just trying to make your character run, would it be better for you to just alter the walk speed? Or is there some reason your need it to be a velocity?
I need it to be a velocity because i want to force the player to run, not just to a specific point but like a directional run that is forced, however if theres a better way to acheive this(that is not like 10x harder to code) let me know
Instead of making a new LinearVelocity every time the game is rendered, you should just create one that goes for as long as you need the character moving. This makes it both easier to manipulate how fast they are going and saves resources so you could do something like this.
local player = game.Players.LocalPlayer
local char = player.Character
local hum = char:FindFirstChild("Humanoid")
local runanim = hum:LoadAnimation(script.RunAnim)
local root = char:FindFirstChild("HumanoidRootPart")
local CharacterRunningDuration = 3
runanim.Priority = Enum.AnimationPriority.Action
local function activate()
game.ReplicatedStorage.Remotes.Cyborgs.RunningBlast:FireServer(char,root,hum)
runanim:Play()
local BV = Instance.new("LinearVelocity")
BV.Parent = root
BV.Attachment0 = root.RootAttachment
BV.MaxForce = 100000
BV.VectorVelocity = 1000000 * root.CFrame.LookVector -- This will still cause your character to move INCREDIBLY fast I believe.
game:GetService("Debris"):AddItem(BV, CharacterRunningDuration)
end
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
activate()
end)
that would be great, but i want the player to be able to change the direction that they are moving based on where they are facing, hence the replacing velocities every frame
You might find it easier to just update the vectorVelocity every frame then instead of creating a whole new instance so create a connection to RenderStepped Right after creating the body velocity and disconnect after the CharacterRunningDuration. If the only thing you are worried about is the speed, I still think you could try lowering the first value in your VectorVelocity at initial assignment.