How to execute a function that is assigned to a variable?

Hi, I have been banging my head on this for quite awhile now. Seems trivial, however, I just cant get it to work.

I have a lua file named BX1. In that lua file I have a function called runCar1().

Normally I would just call the function this way: BX1.runCar1().

However, I need to assign BX1.runCar1() to a variable named loadCar and execute loadCar.

I just can’t get this to work. Any ideas please?

Thank you in advance,

Walt

local loadCar = BX1.runCar1

loadCar()

Rob

Thanks Rob, something so obvious, yet not to me.

local loadCar = BX1.runCar1

loadCar()

Rob

Thanks Rob, something so obvious, yet not to me.