So what I'm trying to explain is I have this shirt and these pants, and they'll only work if the player is currently wearing something. So let's say they color their avatar as a noob or something and wear nothing. It won't work. Please help :(
wait(2)
if script.Parent.Parent.TeamColor == BrickColor.new("Bright blue") then
if workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Shirt") ~= nil then
workspace:FindFirstChild(script.Parent.Parent.Name).Shirt:remove()
b = Instance.new("Shirt")
b.ShirtTemplate = ("http://www.roblox.com/asset/?id=142159396")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
elseif workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Torso") ~= nil then --my troublesss
b = Instance.new("Shirt")
b.ShirtTemplate = ("http://www.roblox.com/asset/?id=142159396")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
end
end
wait(2)
if script.Parent.Parent.TeamColor == BrickColor.new("Bright blue") then
if workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Pants") ~= nil then
workspace:FindFirstChild(script.Parent.Parent.Name).Pants:remove()
b = Instance.new("Pants")
b.PantsTemplate = ("http://www.roblox.com/asset/?id=198079364")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
elseif workspace:FindFirstChild(script.Parent.Parent.Name):FindFirstChild("Pants") ~= nil then -- don't know what to put here
b = Instance.new("Pants")
b.ShirtTemplate = ("http://www.roblox.com/asset/?id=198079364")
b.Parent = workspace:FindFirstChild(script.Parent.Parent.Name)
end
end
Thanks, LukeGabrieI
