Studio crashes when I parent a character clone to workspace.Terrain with localScripts

Issue Type: Crashing
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2021-05-14 00:05:00 (+02:00)
Date Last Experienced:

Reproduction Steps:
Unfortunately, I could not pin down the steps to reproduce this issue. I hope I can provide enough info for you to investigate though.

My studio freezes whenever I run this code:
character.Archivable = true
local dummy = character:Clone()
local dummyRoot = dummy.HumanoidRootPart
dummyRoot.Anchored = true
dummy.Parent = Terrain

If I comment out the last line, it stops freezing.

This piece of code has existed for months in my game and it did not freeze until today. Now, even my old files from months ago will freeze when I run the code.

Do note that this code does not freeze studio by itself, as I’ve tried to run it in a blank file and it did not freeze. There must be something else that interacts with it but as I have mentioned I could not pin it down.

Expected Behavior:
I expect the studio not to freeze.

Actual Behavior:
Studio freezes indefinitely and I have to terminate it.

Deleting all localscripts inside dummy before parenting it to workspace.Terrain fixed this.

1 Like

Can you provide a file that reproduces this issue? Does this require the game to be in run mode? This code you’ve provided does not cause the issue in a baseplate, so there is nothing to investigate. Odds are you have a script in the character that misbehaves when the character is placed into Terrain, which is then your responsibility to investigate.

1 Like

I cannot provide a file that reproduces this issue as stated in the post already. If the engineers choose not to investigate because of that it’s up too them.

Misbehaving script seem implausible as LocalScripts cannot run in Terrain. Also, if that were true, my old files should have froze studio before as well. Studio only started to freeze today, with a codebase that worked fine prior.