This should do the trick:
local Infected = game.Workspace.Infected
local DefaultWait = 0.4
local function GoInfected(BodyColor) --Infected function
BodyColor.HeadColor = BrickColor.new("Lime green")
wait(DefaultWait)
BodyColor.LeftArmColor = BrickColor.new("Lime green")
wait(DefaultWait)
BodyColor.RightArmColor = BrickColor.new("Lime green")
wait(DefaultWait)
BodyColor.LeftLegColor = BrickColor.new("Lime green")
wait(DefaultWait)
BodyColor.RightLegColor = BrickColor.new("Lime green")
wait(DefaultWait)
BodyColor.TorsoColor = BrickColor.new("Lime green")
end
--Get infected People
while true do
for v, child in pairs(Infected:GetChildren()) do
--Get infected Part
for _, part in ipairs(child:GetDescendants()) do
--Infected Script
if part:IsA("BasePart") and part.CanTouch == true then
part.Touched:Connect(function(hit)
print("Touched")
local Zombie = hit.Parent
if Zombie.Parent == Infected then
print("Already Infected")
else
if Zombie:FindFirstChild("Humanoid") then
wait(0.8)
local BodyColors = Zombie:FindFirstChild("Body Colors")
GoInfected(BodyColors)
Zombie.Parent = Infected
end
end
end)
end
end
end
wait(1)
end