Game crashing when running a code that tracks when the player health is at 250 and starts a cinematic squence device

using { /Fortnite.com/Devices }
using { /Fortnite.com/Characters }
using { /Fortnite.com/Playspaces }
using { /Verse.org/Simulation }
using { /Verse.org/Verse }

hello_world_device := class(creative_device):

@editable
MyDevice : cinematic_sequence_device = cinematic_sequence_device {}


# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void= 
    AllPlayers: []player = Self.GetPlayspace().GetPlayers()
    if (FirstPlayer : player = AllPlayers[0]):
        if (FortniteCharacter : fort_character = FirstPlayer.GetFortCharacter[]):
            health:=FortniteCharacter.GetHealth()
            maxhealth:=FortniteCharacter.GetMaxHealth()
            loop:
                if ( health=250.0):
                    MyDevice.Play()
                    break