Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Blood script? [closed]

Asked by 10 years ago

How do i make a script that when a player gets hurt blood falls?

Closed as Not Constructive by User#2

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
1
Answered by 10 years ago

You might need a few scripts put together for this, but here is one script. (If this doesn't work using free models would be easier XD)

script.Bloodshot.Parent = game.StarterGui

game.Workspace.ChildAdded:connect(function(child)

P = game.Players:GetPlayerFromCharacter(child)
if P ~= nil then
    if P.Character ~= nil then
        H = P.Character:findFirstChild("Humanoid")
        if H ~= nil then
            T = P.Character:findFirstChild("Torso")
            -- You need a Torso and Humanoid for this to affect on a person.
            if T ~= nil then
                P.Character.Health:remove()
                giveblood = script.BloodShotS:clone()
                giveblood.Disabled = false
                giveblood.Parent = P.Character
                local part = Instance.new("Part")
                local weld = Instance.new("Weld")
                weld.Part0 = part
                weld.Part1 = T
                weld.C0 = CFrame.new(0,5,0)
                weld.Parent = T
                part.Name = "Connector"
                float = Instance.new("BodyForce")
                float.force = Vector3.new(0,1000,0)
                float.Parent = part
                part.Transparency = 1
                part.CanCollide = false
                part.Parent = T.Parent
                fallingdamage = script.FallingDamage:clone()
                fallingdamage.Disabled = false
                fallingdamage.Parent = P.Character
            end
        end
    end
end

end)

Ad