Use of memory or use of CPU (Modules)

local part = nil;
local booleanmodule = false
local function semiautomatic(key)
if key.Usererfsds == Enum.UserInputasdsa.Mousebutton1 then
booleanmodule = true
part.ASEMBLITREGDSVELOCITY = CFrame.new(12312,3123,13123)--not importing
end
end

fuction module:Change(Part,boolean,funsion) 
part = Part
local conexion = nil
conexion=  UIS.InputBegan:Connect(funsion)
end

local script:

function changeweapon(item)
modulo:Change(Part,Bolean,semiautomatic)
end

or
module:

function:SemiAutomatic(Part,Bollean)
--function 
end 

local script:

Uis.InputBegan:Connect(function()
if key.USDSFDSDFS == Enum.UserInputasdad.MouseButton1 then
modulo:SemiAutomatic(Part,Bollean)
end
end)

basically in the first example the script sends the parameters so that the module script disconnects the previous events and connects the new ones. and in the other example the local script detects the events and sends the parameters to the module script and the module script executes the function.

I dont know if its just me being stupid, but I cant seem to figure out what the question is lol

2 Likes

Ikr, this has to be a troll, I mean look at the use of the word Boolean and the amount of various ways its spelled lol. Also peep fuction + funsion :skull:

no it is not troll @PANDASonNOOB basically the first option explains how it is in the module and in the script, basically imagine that I want to make a weapon system, and when equipping change the events of the module script, in the other example the same thing happens but the difference is that the events are detected in the lcoal script instead of the module, I ask which is more optimized.

I would suggest specifying that in the original post, as I would believe its pretty much impossible to figure out what you are asking.

basically in the first example the script sends the parameters so that the module script disconnects the previous events and connects the new ones. and in the other example the local script detects the events and sends the parameters to the module script and the module script executes the function.

The problem here is that you don’t know how to use modules, not that I have to explain something so simple? @PANDASonNOOB

I don’t know if this is your actual code, or just you trying to re-write it in the post, but you can use Copy and Paste to directly put your code here. The code you have written has a lot of mistakes.

In case you are a troll, just remember you aren’t wasting anybody’s time except your own.

I do admit I aint the best at modules, but even if I was the best in the world, I dont think id be able to guess what the question was based on 4 random scripts and a title. (also why do u keep replying to the wrong person?)

anyways I would say the 2nd is probably better