Hello! Im trying to make a SAO death effect
refference :- https://www.youtube.com/watch?v=42CtYgxy9iE&ab_channel=Mikksh1t
I have made the animation just having problems implementing it
Animation:-
DiedDetector Script
script.Parent:WaitForChild("Humanoid").Died:Connect(function()
game.ReplicatedStorage.DiedRE:FireServer()
end)
DeathHandler Script
local ts = game:GetService("TweenService")
local fadeTI = TweenInfo.new(5, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut) -- This controls the fade animation duration
local particlesTI = TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut) -- This controls the particles animation duration
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.BreakJointsOnDeath = false
end)
end)
game.ReplicatedStorage.DiedRE.OnServerEvent:Connect(function(plr)
if not plr.Character or not plr.Character:FindFirstChild("Humanoid") then return end
local char = plr.Character
local humanoid = char.Humanoid
local animator = humanoid:WaitForChild("Animator")
char.HumanoidRootPart.Anchored = true
-- Slow down the animation by increasing the duration
local deathAnimTrack = animator:LoadAnimation(script.DeathAnimation)
deathAnimTrack:AdjustSpeed(0.325) -- This will slow down the animation to half its original speed
deathAnimTrack:Play()
deathAnimTrack:GetMarkerReachedSignal("DeathAnimParticle"):Connect(function(paramString)
for i, d in pairs(char:GetDescendants()) do
if d:IsA("BasePart") or d:IsA("Decal") then
spawn(function()
ts:Create(d, fadeTI, {Transparency = 1}):Play()
local particles = script.DeathParticles:Clone()
particles.Rate = 0
ts:Create(particles, particlesTI, {Rate = 100}):Play()
particles.Parent = d
wait(3)
ts:Create(particles, particlesTI, {Rate = 0}):Play()
end)
end
end
end)
wait(5)
plr:LoadCharacter()
end)
The problem I am facing is that the ParticleDeath is not playing. I did make key events and all