i have this problem where then stun is apply for some reason 2 players can be affected by stun i hada add parameters in de localscript where the signal is sended and i knwo that if the signal is already sended it is not magicaly going to disappear so i tought that if I apply the same "if not stun then" it would work and well, it did not work.
#2 players hitting at a similar time
1 messages · Page 1 of 1 (latest)
literally have no clue what you just said just explain whats going on right now and what you want it to do i did not understand a word
jajajaaj sure
imagine that a player sends a signal
a punch
and it goes to the server
and imagine that the punch has delay
so it going to take 1 second to land the punch
so in the server were the punch lands
i want that if a player "plr" has stun it cancells
stun? so like a block?
no here me out
if you punch
and a has been punched
it applies stun
and if you have stun you CAN NOT pucnh
ohh ok so like if someone is stunned you want it so they cant punch while they are in the stun?
yes
but that is already code it
what you have just said works but not at 100%
if two players land a punch at a similir time
they both take damage instead of only the last one to send the punch
have a table this is how i do this stuff it might be a bad way but idk i use a table and i insert whats going on
so like if someone is stunned add them to the table and check if they player throwing a punch is in the table then return end the script or just end it idk
well basically what you have just said is, well i think is the same that i am doing, the difference is that i use attributes instead of tables
oh idk tbh man ngl only way would be to just have more checks or idk if there is a delay though between the remote firing it could be that you might be that idk
This is how i code it, in a local script a send a signal that if an enemy is in a hitbox it send a signal to a server where it applys stun
Yeah ok, but thanks a lot man i appreciate your time
wait what, i understand what you say but at the same time i dont
OOOOOOOO
yeah i understand it
but i think the problem is still going to persist
because it just like putting the code in another place
yeah but module scripts you can grab data directly from it you dont have to sent it through an event so its faster so maybe doing that it will be able to check who was stunned first quicker then the remote event i think the issue is the punch code or what ever runs faster than the server can get the info that a player is stunned
WAITT
i have an idea
the hitbox system
that i use
isa a module script
so i can chek it literally
thre
and just put somehting
like iof plr.stun true then return end
THANKS ALOOT!!!!
oh np sorry im bad at studio im a web developer more than a roblox game developer
yeah bro no problem