#why did I get a lag spike

1 messages ยท Page 1 of 1 (latest)

long drum
#

how to replicate:

#

'a' script:

task.wait(3)
local thing = script.b:Clone()
thing.Parent = workspace
thing.Enabled = true
task.wait(8)
thing:Destroy()
#

'b' script:

while true do
    local part = Instance.new("Part")
    part.Position = Vector3.new(0, 10, 0)
    part.Parent = workspace
    task.wait(1)
end
#

a: Enabled
b: Disabled

#

Explanation: my screen freezes for a second after the b script/thing gets destroyed

#

@rancid garden

rancid garden
#

Idk first dev forum post about it was from 2017

long drum
#

do u mind explaining?

#

๐Ÿ™

rancid garden
#

I have no clue

#

Even just destroying a disabled script in workspace causes this

rancid garden
#

Seems like its specifically when destroying scripts

#

But in all the bug reports that I was reading they all came to different conclusions

long drum
#

ok ill look

rancid garden
#

Like I wonder if this happens with tools

#

yep

#

as long as it contains a script

long drum
#

must happen with gui too

rancid garden
#

Well

#

If there is script in the gui yea

#

I think its just scripts

long drum
#

yeah

rancid garden
#

Cuz its just this "Write Marshalled" thing I see

#

Whenever destroying script

#

wonder if module is same way

#

Yep

long drum
#

dam

#

well i encountered this when i was testing a way to do client fx without remote events

#

cuz im lazu

rancid garden
#

They basically fixed the issue with tags but didn't say anything else

#

They concluded was due to destroying the script as well

#

I do feel like this is some sort of bug

#

Don't understand how its taking that long

long drum
#

oh ok

rancid garden
#

I mean the first dev forum post from 2017 says the same "Write Marshalled" issue

#

And then not much was said between like 2018 to now

#

So I don't know if this bug just reappeared or if its always existed

#

Cuz I never had this issue before myself

acoustic atlas
#

It disappeared after I stopped using humanoids

rancid garden
#

Did you have scripts

acoustic atlas
#

Idk the cause

rancid garden
#

That were being destroyed

acoustic atlas
rancid garden
#

Maybe since humanoids got a built in Roblox script it was causing that

acoustic atlas
#

might be

#

but only happened once

#

at the start of the game

rancid garden
#

o

swift orbit
rancid garden
#

Yeah idk if its new

#

Felt like I would have noticed when destroying tools