Hi! I have come to the devforum for help on how to use NevermoreEngine’s Signals and Maids. This is also my first time posting on here so I am no expert on how to format posts.
I have been attempting to use them for several hours but can’t entirely wrap my head around them and would appreciate some help.
-Script
local TestModule = require(game:GetService("ReplicatedStorage").ModuleScript)
local TestModule = TestModule.new()
wait(1)
TestModule:fireSection()
TestModule.exampleSignal:Connect(function()
print("Worked!")
end)
-Module
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Vendors = ReplicatedStorage.Vendors
local Signal = require(Vendors.Signal)
local Maid = require(Vendors.Maid)
local TestModule = {}
TestModule.__index = TestModule
--CONSTRUCTOR
function TestModule.new()
local self = {}
setmetatable(self, TestModule)
local maid = Maid.new()
self.exampleSignal = maid:GiveTask(Signal.new())
return self
end
--METHODS
function TestModule:fireSection()
self.exampleSignal:Fire() --Erroring Line
end
return TestModule
Upon running this I get the error: ReplicatedStorage.ModuleScript:22: attempt to index number with ‘Fire’.