Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with variables in modules?

So i have some modules, i also have a services module (it stores all the services) that is stored in ReplicatedStorage. One of my modules gets errors from output and posts them on my discord, here is example:

function module:postError(webhook, message, `httpService`)
	httpService:posterrorBlaBlaBla
end

well so what i am talking about now is the http service as a variable in the function, my question is if it is good to send the http service from the main script like i made through function everytime i call it, or should i require the services module and create a local variable for it in the module?

Thanks, kirda

1 answer

✓ Accepted answer

Pretty sure its better to require the services module and create a local variable for it, also dont use ":" if ur not going to use self

1 comment

0

Thanks

This discussion is preserved as it was. New answers, comments, and votes are closed.