i am trying to make a platformer game, the camera is on rails and i want the character to die when he gets off screen
You could set this up a couple of different ways but the simplest would be to just use a Kill Volume.
Basically anything that enters this volume is destroyed.
Another method would be to do this logic manually in blueprints by using a trigger box. On Event Overlap with the trigger box > Destory Actor > Open Level (or Spawn Actor of Class [Player] at set location then possess).
I hope that helps.