Skip to content

Events

Server-side events for monitoring party system activities.

Member Events

OnMemberJoined

lua
PartySystem:OnMemberJoined(function(party: Party, member: Player, members: {Player}): nil
    print(member.Name .. " joined " .. party.PartyName)
    print("Current members:", #members)
end)

OnMemberLeft

lua
PartySystem:OnMemberLeft(function(party: Party, member: Player, members: {Player}, kicked: bool): nil
    if kicked then
        print(member.Name .. " was kicked from " .. party.PartyName)
    else
        print(member.Name .. " left " .. party.PartyName)
    end
end)

Invite Events

OnInviteSent

lua
PartySystem:OnInviteSent(function(invite: Instance, leader: Player, invited: Player, party: Party): nil
    print(leader.Name .. " invited " .. invited.Name .. " to " .. party.PartyName)
end)

OnInviteRevoked

lua
PartySystem:OnInviteRevoked(function(party: Party, player: Player): nil
    print("Invite revoked for " .. player.Name)
end)

OnInviteExpired

lua
PartySystem:OnInviteExpired(function(party: Party, player: Player): nil
    print("Invite expired for " .. player.Name)
end)

Party Events

OnPartyCreate

lua
PartySystem:OnPartyCreate(function(party: Party): nil
    print("New party created: " .. party.PartyName)
end)

OnDisband

lua
PartySystem:OnDisband(function(party: Party, leader: Player, members: {Player}): nil
    print(party.PartyName .. " was disbanded by " .. leader.Name)
end)

OnPartyNameChanged

lua
PartySystem:OnPartyNameChanged(function(party: Party, oldName: string, newName: string): nil
    print("Party name changed from " .. oldName .. " to " .. newName)
end)

Permission Events

OnMemberPermissionsChanged

lua
PartySystem:OnMemberPermissionsChanged(function(party: Party, member: Player, perm: string, toggle: bool): nil
    print(member.Name .. "'s " .. perm .. " permission set to " .. tostring(toggle))
end)

Released under the MIT License.