-
how to make kill effect affect on killed player?
-
i tried to get the hitted target on the sword but it not worked
Can You Guys Make that for me
script:
game.ReplicatedStorage.DiedRE.OnServerEvent:Connect(function(plr)
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char.Humanoid
char.HumanoidRootPart.Anchored = true
local cloneEffect = rs.Effects.Light:Clone()
--//EffectFunction//--
local function SnowEffect()
local p = char:GetDescendants()
for _, char2 in ipairs(p) do
if char2:IsA("BasePart") then
char2.Anchored = true
ts:Create(char2, fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
end
if char2:IsA("Shirt") or char2:IsA("Pants") then
ts:Create(char2, fadeTI, {Color3 = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
end
ts:Create(char:WaitForChild("Torso"), fadeTI, {Color = Color3.new(0.27451, 0.65098, 0.827451)}):Play()
end
cloneEffect.Parent = char.HumanoidRootPart
cloneEffect.Position = char.HumanoidRootPart.Position
end
for i, d in ipairs(char:GetDescendants()) do
if d:IsA("BasePart") or d:IsA("Decal") then
spawn(function()
if char:WaitForChild("Values").Effect1.Value == true then
SnowEffect()
end
end)
end
end
wait(5)
plr:LoadCharacter()
end)
thanks