function HDied(aplayer)
wait(1)
player = game.Players:GetPlayerFromCharacter(aplayer)
if player ~= nil then
game.Lighting.GuiFlash.Value = false
print(player)
game.Lighting.GuiText.Value = (player.. " has died!")
player.TeamColor = BrickColor.new("Forest green")
end
end
please help!

5 comments
It does not work...
Because you are using Lighting as a container, something you should NEVER be doing.
And it does help for us to know what is calling the HDied function as that could be a problem as well
I fixed it!
it is important to put local before variables when putting variables in functions