Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is local used in front of functions in some tutorials but not others?

So I have reading and watching tutorials and I have noticed something odd. Some of them use local in front of function like so:

local function helloWriter()
	print("Hello")
end

while others just do this:

function helloWriter()
	print("Hello")
end

Could someone explain what is going on here? I know what local is for when using variables however I am confused by using it in front of functions. Thank you.

1 comment

0

doesn't matter, I dont't think, probs local script vs normal.

2 answers

If i'm not mistaken, it's the same difference as with variables.

Probably helps with loops or something.

This discussion is preserved as it was. New answers, comments, and votes are closed.