Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

MouseButton1Down:connect Doesn't Work When a Module is linked?

Asked by 7 years ago

So I'm using MouseButton1Down to detect a click of the scripts parent (being a textbox). When this happens, I want it to run a function from a module I've linked. However, when the module is linked, it doesn't work. What should I do?

Thanks!

Code:


local module= require(game.ServerScriptService.Modules.module1) script.Parent.MouseButton1Down:connect(function() module.function end)
0
Can you show the code in the module? Additionally, you can not use function as the name of the function. You also need to call the function properly using the parenthesis (). M39a9am3R 3210 — 7y

Answer this question