8 Way Directional Movement System For R6 (1 Animation)

This resource is about an 8-way directional movement system with only 1 animation for walking. You need to import the RBXM into your game to use it.

Here’s footage of it working:

IMPORTANT NOTE: This script only works with ShiftLock/First Person, and there are 3 stuff you need to move
1 - Move the Normal script (Server script) into ServerScriptService
2 - Move the Local Script (Client script) into StarterCharacterScripts
3 - Move the Remote Event into ReplicatedStorage

Updates Log:
V2 Update:

  • now it replicates to all players smoothly

Here’s the file too:
DirectionalLegsNEW.rbxm (4.4 KB)

28 Likes

Wow, a very helpful tutorial. How do I install a #resources:community-resources

5 Likes

There i changed it to Community Resource

3 Likes

this is neat, thanks for making this.

3 Likes

You made a very good joke which made me laugh

4 Likes

love this so much bro you save me alot of time

2 Likes

This is pretty cool, I will probably look at it since my 4 directional anim code is messy :skull: maybe there’s something to learn from here

-- Convert data to CFrame
				local AngleCFrame = CFrame.fromEulerAngles(0, self.state.angle + math.rad(180), 0)

				local WishDirCFrame = CFrame.fromEulerAngles(0,MathUtils:PlayerVecToAngle(wishDir) + math.rad(180),0)
				-- Get dot products
				local LookDotProduct = AngleCFrame.LookVector:Dot(WishDirCFrame.LookVector)
				local RightDotProduct = AngleCFrame.RightVector:Dot(WishDirCFrame.LookVector)
				-- Pick Animation
				if LookDotProduct > 0.4 then
					self.characterData:PlayAnimation(Enums.Anims.FrontWalk, Enums.AnimChannel.Channel0, false)
				elseif RightDotProduct > 0.6 then
					self.characterData:PlayAnimation(Enums.Anims.RightWalk, Enums.AnimChannel.Channel0, false)
				elseif RightDotProduct < -0.6 then
					self.characterData:PlayAnimation(Enums.Anims.LeftWalk, Enums.AnimChannel.Channel0, false)
				elseif LookDotProduct < -0.4 then
					self.characterData:PlayAnimation(Enums.Anims.BackWalk, Enums.AnimChannel.Channel0, false)
				end
1 Like

when i play it works without shiftlock or fp. but nice! :smiley:

1 Like