[TEAMCREATE] Crash when a script/module that is open is destroyed when a player chats in playsolo

Repro: Destroy any script/module that is open when a player chats in playsolo of a teamcreate place
Put the following in ServerScriptService, hit playsolo and say anything:

repeat wait( ) until #game.Players:GetChildren( ) > 0

game.Players:GetChildren( )[ 1 ].Chatted:connect( function ( )
	
	script:Destroy( )
	
end )

Add more info if possible, try to narrow this down to the minimal amount of code which will cause this issue and post that.

I’ve tried, however, I can’t make a minimal repo, it only crashes with the full thing

Here’s my studio logs:
https://1drv.ms/u/s!At0dt8Qglcp7guwAY8kZOc7vh_jkxg

Can you send me a copy of the module in question?

Insert that into ServerScriptService,

The module gets require()'d into ReplicatedStorage, say destroy/ to destroy the module and you should see the crash

Just got home, I can give you the actual file now:

V-Handle.rbxl (435.9 KB)

Open the MainModule in ReplicatedStorage, play solo and then say destroy/

EDIT: Seems to only crash if it’s a teamcreate place

Bump ( now that code freeze is over ( ? ) )

Bumperoni, this is still happening :frowning:

I can provide crash logs if that helps?

Can you provide a bare-minimum example of this? ie: A place or module that only contains code that causes this issue?

EDIT: Just realised I never uploaded my bare-minimum repro, one second.

My previous repro should work ( Make sure it’s a teamcreate place )

I can’t make a minimal repro, I’m not sure what exactly is causing this unfortunately…

All I know is it only occurs when said module is open in a tab ( Not the current tab ) and I use the destroy/ admin command which only runs script:Destroy( ). Any waits prevents the crashes so I can’t print to see if the crash is occurring before or after the :Destroy( ) is called

The teamcreate place I’m testing it in:

Scratch that, I managed to get it down to the module being destroyed from a function that is called when a player chats:

Repro.rbxl (71.6 KB)

In a teamcreate place open game.ServerScriptService.Script.MainModule then play solo and say anything and it will crash

That doesn’t crash for me. The chat still works fine, though there is a warning in the output because nothing is returned from the chat function.

That’s really weird, it crashes every time for me -

Windows 10
Latest Geforce driver, GTX 980M

Are you in teamcreate? Do you open the script first and then press play solo?

Ah, missed that it had to be opened as well. It looks like this doesn’t happen if I try to replicate this without using the chat system. Does this only happen if you use chat to trigger the module’s deletion?

It used to happen with .Chatted too, although it seems .Chatted no longer works in studio so I can’t test?

So it only happens with chat functions?

I believe so. I haven’t been able to replicate it any other way.

Any ETA on when this will be fixed?