#How to play an animation on a player that is getting stunned?
1 messages · Page 1 of 1 (latest)
This is the script:
fire remote to their client and play the animation on their client
@manic narwhal
what if person A stuns someone, and then shortly after person B stuns the same person
but they get .IsStunned.Value = false from the first stun from person A, even though person B's stun is still going
think about that
so how would i get it to work on a dummy? (or how would I go about testing without a second actual person)
get what to work
when i try to stun a dummy, it gives me an error because its not an actual client
ah
so how would i play the anim on the dummy
check if the humanoid hit is of a player or nonplayer
if it's of a player fire to their client
if not then play animation on server
also how would you propose i go about fixing the problem highlighted here?
cause now that i think abt it the attacking system works (roughly) the same way, and i haven't run into this problem (although it only comes from one player)
have a folder, whenever something is added to this folder IsStunned gets set to true, and whenever something is removed from this folder - if there's nothing inside this folder IsStunned gets set to false
u can use:
folder.ChildAdded
folder.ChildRemoved
would this be better off as a table then?
oh thats out of my depth 😭
sorry im really new and i can't really wrap my head around modules 😭
np
i dont think u need modules for this
for what im talking about
theyre just a type of script that returns a value
just like a function
yea but its too confusing to write stuff in so i try to avoid them
uhh yea
is it because its bad...?
the hitboxes script is really cancerous cause its my first time writing it
the code is chopped tho yea but i forgive u cuz ur new
the input is even worse
np
that's ok
the more u work with the code the greater understanding youll have of it and youll start seeing paths to solutions the more u work on it
true
i honestly got burnt out cuz i was doing skills too and i ran into a problem and i found myself having been stuck on this probelm for MONTHS
there are a lot of things i havent even started to understand and i kinda don't get how i should improve
and since then i just quit coding xD
😭
i followed a buncha tutorials, then they didnt teach me what i needed so i decided to do it myself
but that's mainly because i was handling stuns, cancelling attacks, force launching attacks upon hits - pretty much like how blox fruits does it
that sounds really complicated
it's not really so much complicated, but when all of that stuff mixes together
then it becomes a little bit much to handle (at least for a noob like me)
i totally get it
the blocking code was such a weird thing to learn and combining it with all the other junk was really annoying
ye ive never done blocking
** You are now Level 10! **
it was something i couldnt wrap my head around for a while and it had me tearing my hair out
its all math 😭
rly?
hmm
dont u literally just check if someone is blocking then u do reduced damage
yea smth with dotproducts
and for actually using the block it's like any other ability
yea ion think u need all that unless im imaginging something different
for the knockback?
well maybe in the future, but rn its to see if the player is behind the other player
so that attacks will be negated from the front if blocking, but will get hit from behind
ohh lol
my goofy ahh woulda just done a hitbox in front of the character to check if the opponent is behind or in front
that was the first thing i did but i thought about it and it seems like it would be a little laggy / it would get counted as behind from the front if the hitbox is too large
well i wouldnt be using touched
id use getpartboundsinbox
which is like raycasting but an actual box with a given size and cframe
and it's an instant check
so i can instantly check who is behind and who is front of X character
that makes sense, here is the video of the silly hitbox system
it seems to work ok im just praying it isn't too heavy on ping
wdym
yea no its really basic as it is rn i dont have the capacity to script that rn lol
like i hope it doesnt cause a lot of lag
dw it's not that far apart from what u have here, it's easy to make basic element attacks
ah
i wouldnt worry about that if ur beginner
just focus on getting stuff working
looking at the ping graph it seems fine so im gonna do that