Here is a BloodModule I have been working on, the issue with it is the ‘Part’ let’s call it is invisible until tween2 plays. I was hoping someone with the knowledge would be able to tell me where the script fails?
- This is held within StarterCharacterScripts on a ServerScript
local torso = script.Parent:FindFirstChild("Torso")
local leg = script.Parent:FindFirstChild("Left Leg")
local droplet = game.ServerStorage.Droplets.BloodDroplet
local tweenservice = game:GetService("TweenService")
while wait(0.25) do
local x = torso.Position.X + math.random(-torso.Size.X/2,torso.Size.X/2) + math.random(-2,2)
local y = torso.Position.Y + math.random(-torso.Size.Y/2,torso.Size.Y/2) + math.random(0,1)
local z = torso.Position.Z + math.random(-torso.Size.Z/2,torso.Size.Z/2) + math.random(-2,2)
--local clone = droplets[math.random(1,#droplets)]:Clone()
local clone = droplet:Clone() --clones designation
clone.Parent = script.Parent --parents it
clone.Size = Vector3.new(math.random(0.25,0.5),math.random(0.75,2.5),math.random(0.25,0.5))
clone.Position = Vector3.new(x,y,z)
local yfactor = clone.Size.Y --sets the maniplication factor
task.spawn(function()
local tweenT = y / 8 --time = distance/speed
local properties = {Position = Vector3.new(x,torso.Position.Y - (torso.Size.Y * 1.5) , z)}
local info = TweenInfo.new(tweenT,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false)
local tween = tweenservice:Create(clone,info,properties)
tween:Play()
tween.Completed:Wait()
local properties2 = {Size = Vector3.new(yfactor*1.5,yfactor/2,yfactor*1.5)}
local info2 = TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false)
local tween2 = tweenservice:Create(clone,info2,properties2)
tween2:Play()
tween2.Completed:Wait()
task.wait(0.5)
local properties3 = {Size = Vector3.new(0,0,0),Color = Color3.new(0,0,0)}
local info3 = TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false)
local tween3 = tweenservice:Create(clone,info3,properties3)
tween3:Play()
tween3.Completed:Wait()
clone:Destroy()
end)
end