I want to say you can do an animation of a person "Walking backwards" (On the spot)
And then you can change the id of the script below on the walking id and use the animation id.
local Players = game:GetService("Players")
local function onCharacterAdded(character)
local humanoid = character:WaitForChild("Humanoid")
for _, playingTracks in pairs(humanoid:GetPlayingAnimationTracks()) do
playingTracks:Stop(0)
end
local animateScript = character:WaitForChild("Animate")
animateScript.run.RunAnim.AnimationId = "rbxassetid://616163682"
animateScript.walk.WalkAnim.AnimationId = "rbxassetid://616168032"
animateScript.jump.JumpAnim.AnimationId = "rbxassetid://616161997"
animateScript.idle.Animation1.AnimationId = "rbxassetid://616158929"
animateScript.idle.Animation2.AnimationId = "rbxassetid://616160636"
animateScript.fall.FallAnim.AnimationId = "rbxassetid://616157476"
animateScript.swim.Swim.AnimationId = "rbxassetid://616165109"
animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://616166655"
animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://616156119"
end
local function onPlayerAdded(player)
player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end
Players.PlayerAdded:Connect(onPlayerAdded)
if you do not know how to do the animation here is what to do:
- Model the character and move the timeline to make the animation
- Once you did make sure to export it name it whatever and get the link (The numbers)
- Change the walking id to rbxassetid://(Your number)
4 comments
The only issue I have is that the player turns rather than just walking backwards, i want him to have the same movement but same direction at the same time while walking.
Oh, I see, what about you use: https://developer.roblox.com/en-us/api-reference/function/UserInputService/IsKeyDown for changing the settings when moved.
Though, how would I force it to move in 1 direction rather than turning around?
You would use the animation I put in the top, I think that would work, if not, I can't help, sorry.