I see it In A lot of scripts I dont understand what It is used for Or how To use it.
✓ ANSWER ACCEPTED
What is "(function()" Used For?
1 answer
✓ Accepted answer
Those are called anonymous functions, they allow you to use less lines to connect to an event.
Example:
game.Workspace.Part.Touched:connect(function (hit) -- Anonymous Function
-- Do stuff here...
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Oh THANKS I Will Use this A lot actually
No problem