Skip to content

Commit

Permalink
clarification
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuh4 committed Jun 22, 2024
1 parent 5d785d0 commit e485369
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Noir/Callbacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ function Noir.Callbacks:Once(name, callback, hideStartWarning)
end

--[[
Get a game callback event.<br>
Get a game callback event. These events may not exist if `Noir.Callbacks:Connect()` or `Noir.Callbacks:Once()` was not called for them.<br>
It's best to use `Noir.Callbacks:Connect()` or `Noir.Callbacks:Once()` instead of getting a callback event directly and connecting to it.
local event = Noir.Callbacks:Get("onPlayerJoin")
local event = Noir.Callbacks:Get("onPlayerJoin") -- can be nil! use Noir.Callbacks:Connect() or Noir.Callbacks:Once() instead to guarantee an event
event:Connect(function()
server.announce("Server", "A player joined!")
Expand Down

0 comments on commit e485369

Please sign in to comment.