I am not really experienced with developing in Roblox as I have started just a few months ago and recently got into learning about Module scripts.
So I know some basics as I have read the API reference. When I got into youtube to learn some more I came in front of things like Mouse Modules and FastCast and there might be several so I may need to learn a lot more.
I started using the mouse module by BRicey instead of
player: GetMouse() {I think this function is unsafe as I have seen on the API reference page though it works}
Do these modules need really advanced scripting knowledge to create and how can we approach making one?
I don’t really understand which category{scripting support and development discussion} this should fall into but because it is related to scripts I am putting this on scripting support.
Thanks
I’m not sure whether or not this needs to be added, but I felt like I should. You can attach functions to tables anyways without a ModuleScript. The definition of a ModuleScript is not “a table with functions attached”. It is “a Lua source container that runs once and must return exactly one value.”
local foo = {
bar = function()
print('baz')
end,
}
foo.bar2 = function()
print('baz2')
end
foo.bar()
foo.bar2()
The reason, however, that ModuleScripts are so commonplace is because they make organization & not repeating yourself incredibly simple. A thread that I recommend you learn with alongside teaching ModuleScripts to yourself is this one:
This thread will do a good job walking you through attaching functions to tables & then why integration with ModuleScripts is so important.