Factory.create parameters (SOLVED)

Hi everyone:wave:

I’m trying to scale game object when creating a new game object using factory.create like this:

factory.create(component, p, nul, nul, 0.5)

However, it gives me an error:
bad argument #4 to ‘create’ (table expected, got nil)

I don’t need to pass a table.

What should I do to scale game object?

Thanks

The parameters are:

factory.create(url, [position], [rotation], [properties], [scale])

Where properties is a table. You should pass an empty table if you have no properties:

factory.create(component, p, nil, {}, 0.5)
3 Likes

Also it is ‘nil’ and not ‘nul’

4 Likes