-
What do you want to achieve? Wanna save some memory
-
What is the issue? Well i have function inside of my code that requires module and i am wondering if that will create or leave memory behind? even i called it repeatedly?
-
What solutions have you tried so far? Didn’t found one
function SpawnObject(Player,ObjectName, Parent)
if not ObjectName and not References.Paths.BurgerPlaceFolderServer.Objects:FindFirstChild(ObjectName) or Player.Team ~= References.Services.Teams["Burger place worker"] then return end
local Object = References.Paths.BurgerPlaceFolderServer.Objects:FindFirstChild(ObjectName):Clone()
Object.Parent = References.Paths.Objects.FoodObjects
Object.CFrame = Parent.CFrame
require(References.Modules.Dragging).SetupPart(Player,Object) -- this
end