Hey, i am trying to make a summon system which works fine but i started to a massive performance issue
When i summon 1 unit i have a small freeze and ping stays the same (which is still bad) BUT when i summon 10 units i lag for multiple seconds and reach between 500 to 900ms (i have 20ms as default ping)
I tried to look trough my functions and test the latency but its not the problem, the performance issue is related to something else
local start = os.clock() -- at the start of my function
print("Function duration:", os.clock() - start, "seconds") -- at the end
The problem is clearly related to these 2 functions but i have no idea what i can do to optimise/avoid lag (its my first roblox game, even tho i have a bit of experience making gmod servers and discord ccs)
This is how far i could get using GPT to optimise the function but i still dont know what makes it lag so much
(dont mind the bad returns of informations, i will do all the feedback part later)
