@Cecia
As Widi already mentioned, you've to update. I think this will cause the error, on the latest engine version the script runs fine.

Regards
TSGames