#How do i reduce lag when many hitboxes creates?
1 messages · Page 1 of 1 (latest)
Run in Parallel and detect hits using the ZonePlus module which is way more accurate and optimized
ZonePlus module..?
alright
so i just replace parts in parts with this module? @shy cliff
zone:onItemEnter(item, function()
print("The item has entered the zone!")
end)
yeah that works but they also have their custom way of detecting players
but that works too yeah
it's like a function called onPlayerEntered
no problem
?
did you use the playerEntered function
all you have to do is use that and then deal damage to the player if you want it to deal damage
you don't have to use get parts in parts INSIDE the playerEntered function
i have thing that if ink shards hits anything they destroyes
so i don't need playerentered
also it lags more
ok so you should use onItemEntered bro 😭
i thought you were detecting players
Trust me it doesn't, i've used ZonePlus for more than 100 parts at the same time and i didn't encounter any lag
It's something you did wrong in your script or maybe you binded it to a heartbeat event
welp alright
oh, i used itemIntered
alright then
i will try again
now the hitbox doesn't even work
Great
i didn't binded it to heartbeat
listen where do you make the zone
do you make an individual zone for each shard
for an each hitbox
eevery second as 10 hitboxes for each shard
i tried
Of course your game lags if it has so many shards
And you should make a table
That contains all the hitboxes
And then pass it into the zone module.new function
alright
i know already
oh
which causes like 0 lag
ohhhhhhhh
alright
i am not used to modules
now it doesn't workkkkkkkkkkkkkk
its doesnt even prints
alr
@shy cliff
i also tried that shard creates one hitbox and the hitbox teleports to shard, it makes less lag
of course.. its doesn't destroyes and creates
after the hitzone module worked bad
bro you're still using get parts in part
** You are now Level 5! **
😭
i am not
You loop throught the getpartsinparts
ohh
the script is extremely confusing and disorganized though 😭
What is the "hite" parameter in the zone module item entered
event
part that got hit
touched
sorry, i just instead of organizing always do something other
it's okay
Also thanks for you patience
No problem
Still, here you don't loop through all the game hitboxes and handle them all at once
I bet that you run the inkShard function like 100 times
And that makes like 100 zone checkers
so you should make a hitbox, weld it to the shard and then use table.insert to put the part into a table
then you add the table as a parameter of zone module.new (you would do this in a separate script or different function)
alright