I want an animation to play when I hold a prompt and that part works, but when I let go of it before i finish holding the prompt, the animation keeps playing, I tried adding a debounce but it doesn't seem to have done anything. I feel like the solution to this is creating an if statement but how would I go about doing that (really new to scripting)
#Animation keeps playing when i let go of prompt
1 messages · Page 1 of 1 (latest)
may i ask why did you put it inside the PlayerAdded function?
that makes no sense
the debounce makes no sense as well
and there's something like PromptButtonHoldEnded too
just use it
and to make your code better do plr.Thirst.Value += 10
yeah do what the guy above said bc if its in playeradded its going to create a new connection when a player joins which can make it bug out, so just take it out and you will be good.
also, the reason it dosen't stop is because that if statement only runs once, so the debounce dosen't do anything and you should just use promptbuttonholdended
thats what i just said
lmao
Smthing like this? if so it still continues to play the animation
say local loadAnim on top of everything
then in promptbuyyonbegan set it to loadanimation without "local" keyword
and that should work
cuz what youre doing now is starting another animation in holdended and stopping it but the other one is still playing
@full breach
yeah i know im just explaning what he was doing wrong more
because all you said was it made no sense and i was just tryna tell him why
if i do this then there is no variable for humanoid character or player so it doesn't run
hes saying to just do local LoadAnim at the top and then assign it in the function so just do LoadAnim = humanoid.Animator... because then both functions have the same variable and not 2 seperate ones
i think i understand what youre saying but when i put the loadanim variable at the top the humanoid is underlined red because there is no humanoid variable there
yeah your just defining it and not setting it equal to anything @full breach
Delete the whole loadanim line in holdended
Did you even read what we said
mb it works now thank you man