Roblox uses functions that can be passed as parameters, acting similarly to callbacks.
Empty
Empty
Empty
local function completeTask(callback)
print("Performing task")
wait(2) -- Simulating task duration
callback("Task completed successfully")
end
local function taskCallback(result)
print("Callback received:", result)
end
completeTask(taskCallback)Roblox Studio
