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

[SOLVED] Calling a function without parenthesis?

Asked by 3 years ago
Edited 3 years ago

Hi there! So I found a script somewhere in the toolbox and decided to see how it is written. However in the script I saw that some functions are called without parenthesis and I don't get how. Can someone explain? Any help appreciated :)

It is a Module Script that looks something like this:

01local module = {}
02 
03local function disablePlacement(plane) -- Function 1
04    if (currentPlane) then
05        renderConnection:disconnect()
06        renderConnection = nil
07        currentPlane = nil
08        module.currentPlane = nil
09        currentEvent:Destroy()
10        currentEvent = nil 
11 
12        if (currentTexture) then
13            currentTexture:Destroy()
14            currentTexture = nil
15        end
View all 86 lines...

NOTE: These are only some parts of the script, not the full version.

Again, any help will be appreciated :)

0
My question here is that it doesn't? Please explain further NarwhalAndMe 141 — 3y
0
Sorry i see now NarwhalAndMe 141 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago

It doesn't call them, it makes it so that the variable is the function I'm pretty sure. I might be wrong.

0
Ah thanks mate, didn't code in roblox for a long time haha guest_20I8 266 — 3y
Ad

Answer this question