Code does not run past LoadCharacter()

Everytime I fire :LoadCharacter(), the code does not continue. I noticed this happens basically on any script that fires :LoadCharacter(), I think a ROBLOX update broke something in my studio? Or maybe my code is wrong, but I don’t think so. Here’s the code here:

for index, child in pairs (game.Players:GetChildren()) do
	if not game.Workspace:FindFirstChild(child.Name) then
		child:LoadCharacter()
	end
end
print("WE MADE IT")

“We made it” does not make it to the output and any other code below won’t fire, and no errors are displayed.

Hey, firstly, I wouldn’t reccomend checking if there’s something in Workspace with the same name as the player; this could error if you have an NPC with the same name for example.

Also, have you tested in-game? Studio sometimes goofs up and doesn’t work the way you’d expect. Try doing something like this;

game.Players.CharacterAutoLoads = false --Disable normal spawning

wait(5) --Delay so you can see your character spawn

for i, v in pairs(game.Players:GetPlayers()) do --Iterate through players
     if not v.Character then --If they don't have a character
          v:LoadCharacter() --Spawn the character
     end
end

Oh you’re right, it can error if something in the game has the same name as the player. Thanks for pointing that out!

It seems to be restarting correctly on a live server (the code I use is a part of a section of restarting the game), I’ll ask a contributor on here and hope they’ll make a studio bug on it oh my request.