Need help with modules and units

i trying to make units controller module that spawns choosen units from units module script

however, its wont work, and i dont really know why

units_controller:
изображение

units:
изображение

code to spawn unit:

require(game.ReplicatedFirst.units_controller):spawnUnit("Captain", Vector3.new(522.754, 4.646, 536.595))

error:

2 Likes

Module is not loaded, also it’s maybe more of a prefer, but please don’t do

Key = Value

more of a

["Key"] = Value

They are equivalent. The square brackets are used to set keys during runtime.

2 Likes