Tried to use plugin instead of script, but there is an error and the game crashes. Cannot read property of "undefined" this time.