✓ Accepted answer
###The problem is very simple. You don't return the function itself. You returned the table instead.
local module = {}
local function OnRenderStepped(deltatime)
print("RenderStepped")
end
return OnRenderStepped
local PlacementModule = require(script.PlacementModule)
game:GetService("RunService").RenderStepped:Connect(PlacementModule)
###Though of course you didn't want that. You wanted to return the table with its functions and such.
local module = {}
function module.OnRenderStepped(deltatime)
print("RenderStepped")
end
return module
local PlacementModule = require(script.PlacementModule)
game:GetService("RunService").RenderStepped:Connect(PlacementModule.OnRenderStepped)
###On a side note, :connect() is deprecated, use :Connect() instead.
1 comment
Ok, thanks!