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

Module wont return nothing How do i fix?

Asked by 5 years ago

I tried making a module which put up a gui that asked the player if they wanted to confirm a gui button click heres the script

local module = {} function module.askr(gui)

local ask = gui:Clone()

ask.Parent = gui.Parent

ask.Enabled = true ask.Frame.yes.MouseButton1Click:connect(function() return true; end) end return module

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
5 years ago
Edited 5 years ago
  1. Are you using local ModReturn = require(YourModule)
  2. Are you actually running the function? ModReturn.askr(Arguments)
  3. Are there any errors, or loops preventing your module from ever being executed?
  4. Doing return true in your onclick function will never do anything, as that'd return true to the RobloxScriptSignal, not whatever you attempt to.
Ad

Answer this question