SHOW:
|
|
- or go back to the newest paste.
1 | - | Put this inside brick: |
1 | + | --Put this inside brick: |
2 | ||
3 | script.Parent.Touched:connect(function(hit) | |
4 | human = hit.Parent:findFirstChild("Humanoid") | |
5 | if human and not hit.Parent:findFirstChild("zombieInfection", recursive)then | |
6 | for _,v in pairs(hit.Parent:GetChildren()) do | |
7 | if v:IsA("Part") then | |
8 | v.BrickColor = BrickColor.new("Bright green") | |
9 | workspace.zombieInfection:Clone().Parent = v --make sure zombieInfection script is disabled in workspace | |
10 | v.zombieInfection.Disabled = false | |
11 | end | |
12 | end | |
13 | end | |
14 | end) | |
15 | ||
16 | - | zombieInfection script put it in workspace(make sure it is disabled): |
16 | + | --zombieInfection script put it in workspace(make sure it is disabled): |
17 | ||
18 | script.Parent.Touched:connect(function(hit) | |
19 | human = hit.Parent:findFirstChild("Humanoid") | |
20 | if human and not hit.Parent:findFirstChild("zombieInfection", recursive) then | |
21 | for _,v in pairs(human:GetChildren()) do | |
22 | if v:IsA("Part") then | |
23 | v.BrickColor = BrickColor.new("Bright green") | |
24 | script:Clone().Parent = v | |
25 | end | |
26 | end | |
27 | end) |