About 164,000 results
Open links in new tab
  1. Using :connect () with functions - Scripting Support - Roblox

    Mar 22, 2022 · Connect is used to connect a function to an event. One such example that many are familiar with is the Touched event, which fires when a part’s touched and passes the intersecting part as a parameter to the function.

  2. Events | Documentation - Roblox Creator Hub

    You connect a function to an event using Connect () to execute code each time the event fires. Most events pass arguments to their connected functions. For example, the BasePart.Touched event passes the object that touched the part (such as a left hand or car wheel), and the Players.PlayerAdded event passes the Player that joined your experience.

  3. Deeper understanding into :Connect (function (Something) - Roblox

    Jan 27, 2022 · Connect function (Event:Connect(func)) connects a function with the event. When the event (RBXScriptSignal) is fired, the function gets called with (or without) arguments.

  4. Functions | Documentation - Roblox Creator Hub

    Functions are blocks of code that you can execute multiple times on command. You can also connect them to events or assign them as callbacks. A function definition includes: The scope of the function (global or local). The function keyword. The name of the function in camelCase. The parameters of the function in parentheses (()).

  5. Connect functions with parameters? - Help and Feedback ... - Roblox

    Apr 15, 2025 · As @EmbatTheHybrid demonstrated, the only viable solution is to create a delegate callback which calls your function with the additional arguments. You can simplify your code by making a variadic function factory, however:

  6. What are connections, and how do they work? - Roblox

    Jul 4, 2023 · The :Connect(fn) is a method of roblox events. This method returns an RBXScriptConnection. This can be stored as a variable like when you return values in a regular function. The RBXScriptConnection is usually used to disconnect the event later when it’s not needed anymore through :Disconnect()

  7. Pass a variable with :Connect (function) - Help and Feedback ... - Roblox

    Aug 3, 2024 · You can’t. You’ll have to connect a function that calls the function with the parameters you want: v.Touched:Connect (function (...) hello (myVariable, ...) end)

  8. Custom :Connect () functions - Help and Feedback / Scripting ... - Roblox

    Mar 6, 2022 · Those aren’t custom :Connect() functions, not in the way that Roblox’s RBXScriptConnection objects work. Those are generic instance methods and can be named anything.

  9. Is adding an additional parameter to a connected function ... - Roblox

    3 days ago · Hey, I have a question. Is it possible to add a second paramater to the PlayerAdded function (or any other event)? I may have explained that terribly, but here is an example script. -- this is an example script to explain my question local players = game:GetService("Players") local PrintText = "TestMessage" -- I want this to be warned -- I …

  10. Roblox Studio & Lua Programming: What is Connect? - YouTube

    In this Roblox Studio tutorial, I explain the common pattern of Events and how they Connect to functions in Lua. Example would be:part.Touched:Connect (what...

  11. Some results have been removed
Refresh