✓ Accepted answer
In the example you used its obvious that you tried to use the character animations, I will tell you this now, this will NEVER work, animations will only move character parts/joints never the HumanoidRootPart (Which is where the camera is centered on). You can fix all this by using a body velocity. (Also make sure to have the animation not move the character or else it will do both movements at the same time). Makes sure this is all a local script.
local player = game:GetService("Players").LocalPlayer
local Character = player.Character or player.CharacterAdded:Wait()
local RootPart = Character.HumanoidRootPart
local BV = Instance.new("BodyVelocity")
BV.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
BV.Velocity = RootPart.CFrame.lookVector.Unit * 50
BV.Parent = RootPart
wait(2)
BV:Destroy()
I hope this fixed your problem and please mark this as the answer if so! :)
6 comments
ill try rn thanks for helping
OMG IT WORKS
Hey dude it works but when i press the R button player playes the walking animation and prevents the slash animation to play if i make players walkspeed 0 can that help?
Yep, that will stop them from moving during the whole movement
hey dude https://gyazo.com/8807c49bfec7a54661dc1b16184ac809 it still doesnt work
make sure the animation is on "Action" priority if the animation isn't playing, looking at it the velocity and movement is obviously ok