My bleeding script does not work correctly, the damage part does work but well yeah...
The blood portion does not work however, so can anyone help me figure out how to fix this?
Any and all help is appreciated.
script.Parent.Touched:connect(function(hit)
if hit.Parent then
local hum = hit.Parent:findFirstChild("Humanoid")
if hum then
local character = hit.Parent
local blood = Instance.new("Part")
blood = Instance.new("Part")
blood.Material = Enum.Material.Granite
blood.BrickColor = BrickColor.new("Really red")
blood.Anchored = false
blood.Locked = true
blood.Size = Vector3.new(1,1,1)
local BloodClone = blood:Clone()
local torso = character:findFirstChild("Torso")
local brick = script.Parent
function bloodspawn()
BloodClone.Parent = torso
BloodClone.Position = CFrame.new(torso.Position.X+1,torso.Position.Y,torso.Position.Z)
end
function GotHit()
if hum then
while wait(6) do
hum.Health = hum.Health - 1
end
bloodspawn()
end
end
GotHit()
end
end
end)

4 comments
You need to be more specific in "not working", is there no effect at all, is there an error in your code or what?
The damage portion of the script works however the actual blood drop portion does not.
Why do you repeat "blood = Instance.new("Part")" twice?
@EmperorVolvax is not moving the blood to the character and is not placing the blood in the workspace. the blood is spawning in nil and getting auto deleted.