[HELP] Zombie Spread Script

I’m trying to make a Virus script and I have most of it done except I can’t Get it to spread by touch. The Spread is through a script that duplicates itself and goes to the other player.
I can’t Figure out how to Make it go to the other player when he/she is touched.

Here is my Current code to Share the Script

local player = script.Parent.Parent.Torso
player.Touched:Connect(function()
        	local die = game:GetService("Players")
        	player.Touched.die:Connect(function()
        	print("Good")
        	local one = script.Parent.SickNow
        	local sick = one:Clone()
        	sick.Parent = script.Parent.Parent.Head
        	end)

I Just need some help with Fixing it.
Note: The ‘Virus Script’ is just a Zombie Script

3 Likes

I think you should rephrase your title and the beginning of your post because I thought you wanted to make a Virus that lagged the studio.

The .Touched:Connect() event has an Instance return.
So:

player.Touched:Connect(function(hit)
print(hit.Parent.Name)
end)

That code would return the other player’s name, the one who touched the infected.

3 Likes

looks like at the moment ur just infecting yourself buddy , instead rephrase to this

player.Touched:Connect(function()
        	local die = game:GetService("Players")
        	player.Touched.die:Connect(function(hit)
        	print("Good")
        	local one = script.Parent.SickNow
        	local sick = one:Clone()
        	sick.Parent = hit.Parent.Head
        	end)```

kinda hard to see what 'one' is for, pls provide more context
3 Likes