Help with module script functions!

I’m quite new to the entire module script and OOP side of ROBLOX, however I’m quite confused on a few things regarding module scripts.

One of my questions is whats the difference between using “:” and “.” for functions? For example, if I had these two functions;

function myModule.FunctionName(args)
end

or using;

function myModule:FunctionName(args)
end

I’m quite confused on this and I’d really appreciate the help.

2 Likes

this is how I use . and :

The “.” functions are mainly used for returning a value.
And the “:” are mainly used for functions that dont return a value like methods

3 Likes

Ah okay thanks, so if I were to use a function lets say to determine whether the player was in a group or not, and return true or false to the server script, would it then be best to use “.”?

3 Likes

Yea it would be the best case to use “.”

2 Likes

Alright!
'preciate it
sdasdasdas

2 Likes

Marked solution doesn’t make much sense so here’s a full explanation:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.