#Animation playing when not moving

1 messages · Page 1 of 1 (latest)

devout socket
#

Could someone help me fix this bug? When i hold shift and im not moving, the animation plays. I tried every ai but they failed. Pls help

keen meadow
#

Hello there

devout socket
keen meadow
#

Ur animation is not moving

devout socket
#

?

keen meadow
#

So I can help you fixed it

devout socket
#

oh you can? Thanks

#

what do i do?

keen meadow
#

Are you d one making the game from scratch

devout socket
#

no

#

im not the guy

keen meadow
#

U can hire me as a partner for ur game

devout socket
#

for free?

distant bridgeBOT
#

studio** You are now Level 3! **studio

keen meadow
#

And i will bring ur game to life

#

No u will pay

devout socket
keen meadow
#

I can't say but I accept IRL money

distant bridgeBOT
#

studio** You are now Level 2! **studio

devout socket
#

no thanks

keen meadow
#

Okay bye

#

U don't want good work

#

That is y ur animation is not working

boreal mural
#

u have to make a detect like

#

local = lastPosition = humanoidrootpart.Position

if (humanoidrootpartPosition - lastPosition) < 0.01 then return end

devout socket
#

do i create a localscript for this

boreal mural
#

Just comvine it in your sprintingScript

boreal mural
#

if (humanoidrootpart.Position - lastPosition).Magnitude < 0.0q

#

Forgot magnitude

devout socket
#

do i replace it with the humanoidrootpartposition - lastposition?

boreal mural
#

Yes

devout socket
#

that doesnt work

devout socket
boreal mural
#

can you shwo me full script?

devout socket
boreal mural
#

no dude

#

local lastPosition = humanoidRootPart.Position

#

make a new variable

#

for humanoidRootPart upper there (if u haven't)

#

local humanoidRootPart: BasePart = player.Character:WaitForChild("HumanoidRootPart")

devout socket
#

what line do i put this in

#

sorry but im not so good in scripting

boreal mural
#

put all upper

distant bridgeBOT
#

studio** You are now Level 2! **studio

devout socket
#

im making a game from scratch

#

alr

boreal mural
#

for the variable

devout socket
#

the 1st lines?

boreal mural
#

no

#

under runService

#

ngl it's so messy tho

#

then put the if statement under UIS.InputBegan then under if keyCode

boreal mural
#

if (humanoidRootPart.Position - lastPosition).Magnitude < 0.01 or 0 then return end

#

no

#

above the Run()

#

so if it detect character isn't moving it will just return without continuing all the codes under it

devout socket
boreal mural
#

try it

#

make variable for humaoidRootPart

#

local humanoidRootPart = player.Character:WaitForChild("HumanoidRootPart")

devout socket
#

do i replace it

#

or put it under

boreal mural
#

put last position uinder the humanodirootpart

#

humanoidRootPart must be first (above the last position)

devout socket
#

like this right?

boreal mural
#

yes i guess

#

does it work?

devout socket
#

no

boreal mural
#

okay remove or 0

#

wait

#

i didn't realize Run() and Sprint() is different

#

also add (humanoidRootPart.Position - lastPosition).Magnitude < 0.01 then return end under if RunConfig.Running then

devout socket
#

like this?

boreal mural
#

yeah sure ig u can put it on the function instead

#

don't forget if

#

if (humanoidRootPart bla bla bla

#

and also the sprint function

devout socket
#

alr i added if

boreal mural
#

add it in the sprint func too

devout socket
boreal mural
#

no

#

under if runconfig

devout socket
#

oh

distant bridgeBOT
#

studio** You are now Level 4! **studio

devout socket
#

alr

void falcon
#

do u want a pre made

#

run script i made

#

like way before

#

ill give it here