Hi guys, I made a localscript that moves the player forward towards whatever direction that they are facing when they press Q by using lookVectors. It works fine, but does anyone know a way to make it look less choppy when the character moves in the direction that they're facing?
local player = game.Players.LocalPlayer
local character = player.CharacterAdded:wait() or workspace[player.Name]
local RollSpam = true
repeat wait() until player.character.Humanoid
local humanoid = player.character.Humanoid
RollAnim = humanoid:LoadAnimation(script.RollAnim)
game:GetService("UserInputService").InputBegan:connect(function(input)
if input.KeyCode == Enum.KeyCode.Q then
if RollSpam == true then
RollSpam = false
RollAnim:Play()
wait(0.1)
local Roll = character:FindFirstChild("HumanoidRootPart")
Roll.CFrame = Roll.CFrame + Roll.CFrame.lookVector*15
wait(1)
RollSpam = true
end
end
end)
Thanks.

1 comment
perfect, thats all I needed, thanks!