so, i'm trying to make a spooky game that has a glitch effect when you die, i already put the script in the startercharacterscripts but it's still not working.
here's the code:
health = character.humanoid.health
eerror = game.lighting.error -- effect name
function dead()
health = 0
end
if dead() then
eerror.enabled = true
end```
i think its an issue with the dead function.
** You are now Level 1! **