I recently started up a new project of mine and have been having issues with a script that is worming its way through all of my bricks and tools. It's titled "Infected," and so far doesn't seem to do much besides repeatedly copying itself into all the items in the game and retitling all of these things to "Infected." Every time I rejoin the game, even after a massive cleaning where I delete all of the copies of the script, it places two new scripts of Infected into the Terrain. If left there, it continues on to infecting all the other items in the game. It's incredibly frustrating as I have gone through every single brick and tool in the game and studied every script for signs of the original, but I haven't been able to find it. I'll note here that I am not very experienced with scripting and might be missing something that a person who knows what they're doing would be able to spot. In the tab "Script Performance," joining the game immediately brings up this.
13:35:17.706 - An error occurred 13:35:17.706 - Script 'Workspace.Infected.Infected.Infected', Line 30 - global Infector 13:35:17.707 - Script 'Workspace.Infected.Infected.Infected', Line 45 13:35:17.708 - Stack End
The script itself says,
model = script.Parent -- Sets the model variable to the script's parent, this way we don't have to manually set model names.
function Infector() while true do -- Infinite loop found = game.Workspace:FindFirstChild("Humanoid") found2 = game.Workspace:FindFirstChild("Model") found3 = game.Workspace:FindFirstChild("Brick") if found ~= nil then found.Name="Infected" infectedscr = model.Infected:Clone() infectedscr.Parent = found else if found2 ~= nil then found2.Name = "Infected" infectedscr2 = model.Infected:Clone() infectedscr2.Parent = found2 else if found3 ~= nil then found3.Name = "Infected" infectedscr3 = model.Infected:Clone() infectedscr3.Parent = found3 else local children = game.Workspace:GetChildren() for c = 1, #children do
if children[c].Name ~= "Infected"
then
children[c].Name = "Infected"
infectedscr421 = model.Infected:Clone()
infectedscr421.Parent = children[c]
else
end
end
end
end
end
wait(10)
end end
Infector()
If anyone could help me with this, I would be incredibly thankful, as I have no idea what this is doing and it's making it hard for me to find things. Thanks!

1 comment
Sorry, just try something like: