#Crawling animation keeps playing despite not moving

1 messages · Page 1 of 1 (latest)

primal mortar
#

What I want to happen is that whenever the player stops moving, the crawling animation stops immediately. However, due to the way I wrote my code, the full animation will play anyways, even if you tap WASD for less than a second.
I know why this is, it's because the way I wrote this script makes the full animation play before checking to see if it needs to be stopped, but how do I fix this? Cause honestly, I have no idea. I'm rather new to scripting, so please be patient with me.

full gate
#

ez

potent linden
primal mortar
#

I feel really dumb but thanks for saying that to make things click together in my head LMAO

primal mortar
#

Oh wait now there's a new bug I think 💀

cosmic dagger
#

And it should work

#

Show?

primal mortar
primal mortar
potent ermineBOT
#

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

primal mortar
potent linden
# primal mortar I- I don't know why I didn't think to do this sooner 😭

your indention is off in a lot of places so the code is harder to read, e.g you do if crawlcheck== true then uis.inputbegan:() ... end end uis.inputended:() end but the way you indented your code makes it look like you connect uis.inputended in the same code block as you do connecting uis.inputbegan and then one has to ponder, what's going on with your indentation? thonk

primal mortar
potent linden
primal mortar
#

there we go

#

wait

#

hold on nvm

potent linden
#

coz if() not on same indent as its' end.

primal mortar
#

I know
there's a third end that looks like it's doing nothing
but if I get rid of it, it marks all the code after it as wrong

#

idk why that is

potent linden
#

indentation doesn't matter to lua, it does to python, but really this is just making it easier to write your own code

#

roblox studio auto-indents for a reason. it's very useful. why not use it? 🤷

#

practice, learn how it works. i belief in you salute

primal mortar
potent linden
cosmic dagger