DISCLAIMER
This is completely using decals, no parts.
This is a really simple yet effective blood system that you can use to amaze your friends, and add a whole other layer of quality to your game!
EVERYTHING NEEDED:
- A sword
- Base knowledge of scripting
- Knowledge on how to add and change assets in Roblox studio
Step 1: Grab a weapon that has a damage script. I’ll be using a sword I made myself.
Step 2: Inside of the tool, create a particle emitter and rename it ‘Blood’ with a capital B, and customize it to your liking. Once you’ve done that, set enabled to false for now.
Step 3: Next, go find the script that deals damage to the player.
(It should be a server-side script named ‘Damage’, ‘Handler’ or something like that.)
IMPORTANT:
Before we start, make sure that your particle emitter and damage script are both children of the sword’s handle part/union, or the script won’t work.
Step 4 (FINAL): Now find the part of the script that tells the humanoid to take damage if hit with the sword/weapon.
(Ignore everything except for the stuff between canDamage.Value = false and if canDamage.Value == true then.
After it says “hum:TakeDamage(WhateverDamage)” insert this script:
local bloodParticle = script.Parent.Blood
bloodParticle.Enabled = true
wait(0.5)
bloodParticle.Enabled = false
(Feel free to change the time it takes for the particles to disappear. You can change that by typing in a different number inside of the wait parathesis.)
The first thing this script does is make a variable that finds the particle emitter we just made. Then it tells the particle emitter to show for a split second, then tells it to disappear. This all happens when you attack an HRP (Humanoid Root Part).
robloxapp-20201125-1551244.wmv (1.2 MB)