game.Players.PlayerAdded:connect(function(player) if Name == "Left Leg" then for _,v in pairs(Parent:GetChildren()) do if v:IsA("CharacterMesh") then v:Remove() end end end end)
How can I get this to work so whenver a player enters they spawn with the basic roblox morph (Guest morph)
Name is undefined, did you set it to "Left Leg" somewhere above the part of the script you posted? And same with parent. You also want to do it when their character is added.
But if you don't really know, this should work fine (to remove the CharacterMeshes):
game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(character) wait(1); local children = character:GetChildren(); for key = 1, #children do local value = children[key]; if value:IsA("CharacterMesh") then value:Destroy(); end end end); end);
Alternatively, you can set the CharacterAppearance property to someone who looks normal, or set the CanLoadCharacterAppearance property to false.
Edit: Fixed a problem with the script.