#hitbox only looping once

1 messages · Page 1 of 1 (latest)

patent stone
#

.

#

the print only goes once

#

so im assuming that it does the for loop only once for some reason

normal palm
#

ok and

normal palm
#

bro came to scripting help and expected us to magically know what's happening

patent stone
#

its obvious that you are trolling instead of helping by saying "ok and"

normal palm
#

hideous logic

patent stone
normal palm
#

you really haven't

patent stone
#

the for loop only goes once and thats the problem

normal palm
#

and how does that help anyone

#

that's like saying that you smelled something distasteful in the air and you want someone to identify the smell third-hand

patent stone
#

if you aint gonna help then dont message in here

clear timber
#

can you show the script

patent stone
normal palm
#

it helps everyone actually

patent stone
#

oh wait

#

discord didnt send it for some reason

normal palm
#

Because it is supposed to get you to say something

patent stone
#

my bad

#

brody...

#

ok pastebin it is

normal palm
#

lowkey pisses me off when people write shit like "hitted" like bro do you even know what the past tense of hit is

patent stone
#

sometimes i just name them a singular letter if im lazy

normal palm
#

ok so first of all

#

the reason it is one loop is because you literally return within the loop

#

like it's not even conditional

#

It just returns after one iteration

#

second, table.find is mid as fuck and you should use the humanoid as the key. that will be better than table.find

#

third, pairs is pointless

patent stone
normal palm
#

fourth, why the hell did you create a part only to do getpartboundsinbox

#

that will include that part you just generated, for one

#

you do not need a part for getpartboundsinbox

patent stone
normal palm
patent stone
normal palm
#

if you want to create it outside of the hitbox function, which makes a lot more sense to me, or else just put it into the params if it isn't already there

#

that being said, if you have overlapping hitboxes, one of those visual parts is bound to be queried for

#

so you should account for it in all of your functions by having them parented to some base parameters structure

#

or, y'know, physics service's collisiongroups

patent stone
#

also the whole looping once part is because of the gaurd clauses stopping the loop right?

normal palm
#

there is one guard clause

#

And one explicit, unconditional return

#

right, actually no two guard clauses, because I read that wrong

#

same reason

open reef
#

Thats what he meant

open reef
patent stone
patent stone
open reef
patent stone
#

would be a pain to make another one