hey guys, I have discovered some toolpack with fun tools to make game more fun while ago,
it’s named “thisbacon toolpack”
it uses an modulescript, and I want to make the gui button that activates the modulescript to mariThiReal upon clicking, but I don’t seems to understand the code at all, so please help me so I can make an button that easily activates the modulescript upon clicking, thank you.
I don’t think you understand how ModuleScripts work.
ModuleScripts are used to store Values for you to use, they also allow you to store functions for you to call and use later, this important and very useful for you has you can easily store, and create portable code for you to use, you can even have some games just completely run with ModuleScripts
ModuleScripts can only be called once, Once they are called with the require() function, they can never be called again by the script, there is no unrequire() or “recalling” for you to do, You should require(),Basically once the ModuleScript returns Data to the Script, it will actually open the script to get that table, if noticed the way the module is coded:
local module = {} -- Table that stores the code
module.Number = 1 -- Stored Number
module.string = "Hi" -- stored string
function module.GetThis()
-- This type of functions are generally used for OOP (Object Oriented Programming)
end
function module:DoThis()
-- This function is usually fired along with the function above
end
-- however, these can be used as regular functions
return module -- returns the Table, effectively ends the Script
Your Modules should be one of the first things before anything else for your scripts to first get the Stored objects within that ModuleScript.
hey uhh weird shadow cat looking guy named cairo or something, I actually managed to solve that modulescript toolpack for my game. the footage of using the special menu of those tools in thisbacon toolpack is like this (ingore the messed up gui that was caused because of device scaling btw):
I could’ve done that yesterday but I was stupid to do it today, have a rotten day.