local Create = assert(LoadLibrary("RbxUtility")).Create local projectiles = { icebolt = { Name = "Icebolt", Parent = Workspace, BrickColor = BrickColor.new("Bright blue"), Reflectance = .5, Transparency = .2, Anchored = true, FormFactor = Enum.FormFactor.Custom, Size = Vector3.new(1, .4, .4), }; } function fire(target, projectile) local proj = Create("Part")(projectiles[projectile]) end return{ Fire = fire }
I'm trying to use the Create
function of the RbxUtility to create the parts for this projectile launcher ModuleScript, but this doesn't appear to be working.
The fire
function here is called once:
local proj = require(script.Parent.ProjectileScript) proj:Fire(nil, "icebolt")
But the icebolt isn't being created from the 'icebolt' table in the ModuleScript, it is only creating a new Part with no properties changed from default.