-- Returns a droplet with the origin of `position`, velocity of `velocity` and optional color and puddleTransparency.
Blood.spawnDroplet(
position: Vector3,
velocity: Vector3,
color: Color3?,
puddleTransparency: number?
)
There is also a settings module inside the blood module which you can customize to your needs.
Here is a video of my blood module in action.
my blood module doesn’t show realistic blood or isn’t too gory, so this module should be fine to use in any game.
On an unrelated note:
Although my module has some flaws, (like this for example), it’s sometimes rare, but only happens if you spawn TOO much blood or a droplet lands on another puddle.
I’ll need to optimize this a lot, as even after puddles are gone my module stays at around 29-30 fps… :fear:
like there are no puddles here and my laptop is plugged in, i might need to clean up raycasting connections
The only gripe i have that i can see from the demo video you provided, is that the blood that was splattered on the wall pools out and expands as if it was on the floor.
other than that though, seems very useful for people wanting some viscera in their games!
Here you go @GrandMarineLCS I have also fixed the issue of the blood pile staying in the air. However, this module will create a folder in the workspace named ‘Temp,’ and the droplet and puddle will be parented to that folder.
Furthermore, I have resolved the problem where the trail color and droplet color did not change.
Usage
local m = require(game.ReplicatedStorage.Blood)
local plr = game.Players.LocalPlayer
local char = plr.Character
script.Parent.MouseButton1Click:Connect(function()
for i = 0,20 do
m.spawnDroplet(
char.HumanoidRootPart.Position,
Vector3.new(math.random(-10,10),15,math.random(-10,10)),
Color3.fromRGB(141, 0, 0),
0
)
end
end)
Yes, as I said before the module creates a folder named Temp to workspace.
And that folder is added to raycast params which will ignore the blood droplet and pile.
Explaination of the code local folder ← lets pretend that the variable value is nil
so if its nil then set droplet parent to “Settings droplet parent”
If its not nil then it will parent it to the temp folder.
example:
local child = nil
print( child and child or "Nope child is nil" ) -- Output: Nope child is nil
local child = workspace.Folder
print( child and child or "Nope child is nil" ) -- Output: Folder