Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Put this inside brick:
- script.Parent.Touched:connect(function(hit)
- human = hit.Parent:findFirstChild("Humanoid")
- if human and not hit.Parent:findFirstChild("zombieInfection", recursive)then
- for _,v in pairs(hit.Parent:GetChildren()) do
- if v:IsA("Part") then
- v.BrickColor = BrickColor.new("Bright green")
- workspace.zombieInfection:Clone().Parent = v --make sure zombieInfection script is disabled in workspace
- v.zombieInfection.Disabled = false
- end
- end
- end
- end)
- --zombieInfection script put it in workspace(make sure it is disabled):
- script.Parent.Touched:connect(function(hit)
- human = hit.Parent:findFirstChild("Humanoid")
- if human and not hit.Parent:findFirstChild("zombieInfection", recursive) then
- for _,v in pairs(human:GetChildren()) do
- if v:IsA("Part") then
- v.BrickColor = BrickColor.new("Bright green")
- script:Clone().Parent = v
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement