Studio crashing when removing player's character

I was going through my games and found my boat simulator so I thought I’d make it FE and play with it a bit, though in the process [ at the start ] studio kept crashing right as I clicked play solo … it was pretty confusing and I didnt know what was going on, after a few crashes trying to fix it, I concluded that removing the player right when it gets added crashes my studio.

game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
char:Destroy()
end)
end)

What I did to solve it is simply add a
repeat wait() until char:FindFirstChild("Humanoid")
before removing the character.

This was done via server script obviously

How to repro this bug

  1. Create a new place
  2. Put a script in [ I put it in ServerScriptService ]
  3. Add the code above without the waiting for humanoid
  4. click play solo
    and no you’ve successfully crashed your studio.

Studio version: 0.291.0.122484
OS: Windows 8.1

I have a fix for this crash, I think I can enable it either tomorrow or next week depending on what release the fix is in.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.