I’m trying to test something to do with physics parts and lag, but for some reason, it won’t spawn more than 5-6 parts(the amount of parts don’t even seem to matter, it’s more based on the speed of the loop) before it starts to instantly delete any new parts being cloned in. I was basically making a part that would spit out small ball parts rapidly. I’ve never had this issue before until just now. Anyone know why this is happening and how I might be able to get around this?
Are the balls falling into the void? if so then they’re being deleted by FallenPartsDestroyHeight property which can be found in the Workspace instance.
I’ve disabled all other scripts and I don’t think any of my plugins would do this, plus I’ve never had this issue before. Also, the spawner part I was using for the position is also being removed for no apparent reason.
Like it’s literally just this:
local ignore = workspace:WaitForChild('Ignore')
local spawner = ignore:WaitForChild('Spawner')
local ball = script:WaitForChild('Ball')
while true do
local part = ball:Clone()
part.Position = spawner.Position
part.Parent = ignore
part = nil
task.wait()
end
Setting a variable to nil only removes it from the reference memory so that it can be properly garbage collected when destroyed. But yes, I tried removing that anyway and it didn’t change a difference. I also tried changing where the ball was located and also tried this on the client.
Could you try this yourself and see if it happens to you? If it doesn’t, maybe it really is a plugin somehow.