How do i make a blur effect when someone has killed a player?

How do i make a blur effect when someone has killed a player?
Example:

A player kills a player, the NPC is at damage 0 and a blur effect comes up. How do i achieve this?

Add a blur effect into lighting and disable it.
Modify the weapon script so it tracks the humanoid’s health, something like this:
First of all find the part of the script that removes health, then just add this:
local health = [The Humanoid You’re Removing Health From].Health
if health <= 0 then
game.Lighting.Blur.Enabled = true
wait()
game.Lighting.Blur.Enabled = false
end
–Note that the code has to be inside a LocalScript else the blur will enable for all the server–

1 Like

01:42:06.778 Players.JustAGameDeveloper1.Backpack.Adventurer Sword.LocalScript:1: Expected identifier when parsing expression, got ‘[’ - Studio - LocalScript:1

blur who the dead person or the killer? also change the topic to scripting support

3 Likes

Dude you just pasted the script in.
[The Humanoid You’re Removing Health From] has to be referenced.
Also, you have to insert a blur object thing in lighting

I did

Summary

This text will be hidden

killer

Summary

This text will be hidden

Change the Humanoid to the path to the Humanoid of whoever you killed

-- after damaging a humanoid
if humanoid.Health <= 0 then
  local Blur =  Instance.new("BlurEffect", workspace.CurrentCamera) -- if it's in a local script
  Blur.Enabled = true
  Blur.Size = [whatever size you want]
end

Where do i place this?

Summary

This text will be hidden

that script will never disable the blur

1 Like

where is the script that damages the enemy?

ServerScriptService i think

Summary

This text will be hidden

yeah if you want to disable it just do

task.Wait(amount you want in seconds)
Blur.Enabled = false

how do you damage the player using a tool?