Hi. I have a function connected to MouseClick, which works outside of the module, but not inside of it. The rest of the module runs fine, but the connection doesn't fire. Can connection lines be used within ModuleScripts?
Example of what I mean:
Server Script:
local module = require(script.Parent.Module) module.initialise()
Module:
local m = {} function m.initialise() -- Definition of ClickDetector, etc etc click.MouseClick:connect(function() print("I was clicked, or something") end) end return m
I'd be able to do this easily without using the module, but it would be better if it could be contained in it. Thanks in advance!
Aaaand solved, it was just me being an idiot; accidentally had one of the checks set to true rather than false.