brick = script.Parent brick.Touched:connect(function(part) print("test") end)
Is an example of an anonymous function. How would I use a pre existing function instead of writing down the function inline?
local function MyNormalFunction(part) print("test") end brick = script.Parent brick.Touched:Connect(MyNormalFunction) -- :connect is deprecated, use :Connect instead.
easy-peesy