plr = game.Players.LocalPlayer
chr = game:GetService("Workspace"):WaitForChild(plr.Name)
human = chr:WaitForChild("Humanoid")
ui = plr.PlayerGui:WaitForChild("base")
rs = game:GetService("ReplicatedStorage")
human.HealthChanged:Connect(function()
ui.health.value.Text = human.Health
if human.Health <= 0 then
game:GetService("Lighting").Blur.Enabled = true
rs.health:FireServer()
end
end)
plr.CharacterAdded:Connect(function()
game:GetService("Lighting").Blur.Enabled = false
end)
this script works only one time....then when the player's character is added it doesn't update the ui.health.Value.Text (it stays 0) and the screen isn't blured if he dies again...i figured out that the human.HealthChanged isn't happening anymore but i don't know why
(a local script inside StarterPlayerScripts)
(sorry i am not a native english speaker)

4 comments
When a player respawns and character is created again, it creates a new Humanoid. The human.HealthChanged function uses the old Humanoid and so it won't fire for the new Humanoid.
that's true..but i don't know how to fix it
you should probably use startercharacterscripts, just a thought. starterplayerscripts only give you scripts when the player joins. when the player dies and respawns, the humanoid variable you made will point to the old humanoid which won't work in your favor. tl;dr: use StarterCharacterScripts, StarterPack, or StarterGui. Or move your script into the CharacterAdded function
i know but i thought there is way to fix it by just changing the variables...but puting the script into StarterCharacterScripts seems to be the only way........thank you ^^