Iv'e already made a script but it's not working for r15. can someone fix this please?

game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) Delay(1, function() local stuff = char:GetChildren()

	for i = 1,#stuff do
		if stuff[i].ClassName=="Hat" or stuff[i].ClassName == "ShirtGraphic" or stuff[i].ClassName=="Pants" or stuff[i].ClassName == "Shirt" or stuff[i].ClassName == "BodyColors" or stuff[i].ClassName == "CharacterMesh" then
		stuff[i]:Remove()
		end
	end
	local stuff1 = char.Torso:GetChildren()
	for i = 1,#stuff1 do
		if stuff1[i].ClassName=="Decal" then
			stuff1[i]:Remove()
		end
	end
	
	
	local shirts = game.ServerStorage.Uniform.Shirts:GetChildren()
	if #shirts >0 then
	local i = math.random(1,#shirts)
	shirts[i]:Clone().Parent=char
	end
	
	local Pants = game.ServerStorage.Uniform.Pants:GetChildren()
	if #Pants >0 then
	local i = math.random (1,#Pants)
	Pants[i]:Clone().Parent=char
	end		
	
	local bodycolor = game.ServerStorage.Uniform.BodyColors:GetChildren()
	if #bodycolor >0 then
	local i = math.random(1,#bodycolor)
	
	char:FindFirstChild("Head").BrickColor = bodycolor[i].Value
	char:FindFirstChild("UpperTorso").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LowerTorso").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LeftUpperArm").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LeftLowerArm").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LeftHand").BrickColor = bodycolor[i].Value	
	char:FindFirstChild("RightUpperArm").BrickColor = bodycolor[i].Value
	char:FindFirstChild("RightLowerArm").BrickColor = bodycolor[i].Value
	char:FindFirstChild("RightHand").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LeftUpperLeg").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LeftLowerLeg").BrickColor = bodycolor[i].Value
	char:FindFirstChild("LeftFoot").BrickColor = bodycolor[i].Value
	char:FindFirstChild("RightUpperLeg").BrickColor = bodycolor[i].Value
	char:FindFirstChild("RightLowerLeg").BrickColor = bodycolor[i].Value
	char:FindFirstChild("RightFoot").BrickColor = bodycolor[i].Value
	end
	
	local faces = game.ServerStorage.Uniform.Faces:GetChildren()
	if #faces > 0 then
	local stuff2 = char.Head:GetChildren()
	for i =1,#stuff2 do
		if stuff2[i].ClassName=="Decal" then
			stuff2[i]:Remove()
		end
	end
	
	local i = math.random(1,#faces)
	faces[i]:Clone().Parent=char.Head	
	end
	
	local packages = game.ServerStorage.Uniform.Package:GetChildren()
	if #packages > 0 then
	local i = math.random (1,#packages)
	local stuff3 = packages[i]:GetChildren()
	for i = 1, #stuff3 do
		stuff3[i]:Clone().Parent=char
	end
	end
	end)		
end)

end)

2 comments

0

Bro, Torso isn't part of r15 characters, only upper torso's and lower torso's are

0

Oh. Well it work if I remove the torso?