ive made a rolling animation but i dont know how to make it so it projects you (moves you) forward depending on which way your character is facing.
Code:
repeat wait() until game.Players.LocalPlayer.Character local Player = game.Players.LocalPlayer local Char = Player.Character local UIS = game:GetService('UserInputService') local Played = false function TestAnim(input) if input.KeyCode == Enum.KeyCode.R and Played == false then Played = true local Anim = Instance.new('Animation') Anim.AnimationId = 'rbxassetid://12345678'-- fake animation id local PlayAnim = Char.Humanoid:LoadAnimation(Anim) PlayAnim:Play() wait(3) Played=false end end UIS.InputBegan:connect(TestAnim)
this script here does a rolling animation but stays at the same place, however i dont know how to make it so it plays the animation and moves you forward. I hope you understand what i mean.
Try using the Vector3, when the animation plays use Vector3 to move the player forward.
The following example would cause 'Player1' (in Workspace) to walk forward, towards where their camera is pointing, wait five seconds, and then stop the player.
Workspace.Player1.Humanoid:Move(Vector3.new(0, 1, 0), true) wait(5) Workspace.Player1.Humanoid:Move(Vector3.new(0, 0, 0), true)
I am not sure if this will work, didnt test it. But try it, hope it works and if you have any problems just ask.
If I helped and it worked please mark it as an answered question. :) Good Luck.