As of so far, this code is functional.
Initially I had a “Maximum event re-entrancy depth exceeded” error due to calling a CharacterAdded event in the middle of the function, which would lead to a loop. In order to prevent this from happening, I just simply had a quick pcall work with a conditional to check if some a specific name are included in the model.
Does anyone see possible limitations and/or bugs that can come with this approach? I’m drop dead tired so my code feels lazy and sluggish right now.
game.Players.PlayerAdded:Connect(function(plyr)
local function loadCustomChar()
local newchar = game.ServerStorage.Characters.StarterCharacter:clone()
newchar.Name = plyr.Name
plyr.Character = newchar
newchar.Parent = workspace
end
plyr.CharacterAdded:Connect(function(char)
local succ, err = pcall(function()
if char:FindFirstChildWhichIsA("MeshPart").Name == "D2indoi2nklasd*(@d221sawdawdn2oi" then
print("Loaded Custom Character!")
end
end)
if err then
loadCustomChar()
end
end)
end)