Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to make a spawn with Guest morph?

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)

1 answer

✓ Accepted answer

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.

13 comments

0

Forgot to mention both of those properties are properties of the player.

0

ok thanks, theres to many end though :P

0

Woops I made a mistake, I'll fix it.

0

ok cool, testing naows :)

0

no, still spawn with roboxian 2.9 :/

0

2.0**

0

It might be the character hasn't fully loaded. Try adding a wait(0.5) before I define the children variable.

0

so line 3 have a wait

0

IT WORKS :D Thanks soo much :)

0

just add a wait(1) on line 3 so that others will see the working one :) Thanks :D

0

Alright

0

ok cools thanks :D

0

No problem, I'm here to help =P

This discussion is preserved as it was. New answers, comments, and votes are closed.