What do you want to achieve?
I want both Fade Effect and Particles to play at the same time, right now Fade Effect always starts the first and when it ends particles start playing… All i want is them both to play at the same time…
What solutions have you tried so far?
It might be a dumb question and an easy solution, but right now i’m clueless and i tried to find something useful in Devforum but didn’t find anything.
Code:
-- Services --
local RS = game:GetService('ReplicatedStorage')
local TS = game:GetService("TweenService")
-- Remotes --
local DeathRemote = RS.Remotes:WaitForChild('DiedRE')
-- Variables --
local fadeTI = TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
local particlesTI = TweenInfo.new(2, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.BreakJointsOnDeath = false
end)
end)
DeathRemote.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
char.HumanoidRootPart.Anchored = true
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.Aura:Clone() and script.Fire:Clone() and script.Orbs: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
wait(5)
plr:LoadCharacter()
end)