Party Service [v2.1] - create a party system more easily

party test.rbxl (72.0 KB)

maybe if you run PartyService:AddPlayer(player, Party)
as a task function (task.spawn()) the print would work

If i want to add the party id inside of a value or in the name of the party list object, such as a template that gets cloned into a scrolling frame where players can join existing parties, or see what parties that are avalible, how would i get the party table from the party object (l;ike the one that you create with partyservice:Create())? ive tried using the function :GetCurrentPartyInfo(), but it will always return nil. sorry if im probably doing something wrong, i have never dealt with parties and other like systems, so i am a bit confused.
image

server

remoteEvents.PartyService.CreateParty.OnServerEvent:Connect(function(player, placeId, partyName, maximumPlayers)
	local newParty = partyService:Create(player, placeId, partyName, maximumPlayers)
	local currentPartyInfo = partyService.GetCurrentPartyInfo() --keeps returning nil
	
	local partyId = currentPartyInfo[1] --the error is occuring here. Ive tried using "Id" instead of the number 1, but encountered the same problem
	
	remoteEvents.PartyService.AddPartyToList:FireAllClients(player, partyName, maximumPlayers, partyId)
end)

client

remoteEvents.PartyService.AddPartyToList.OnClientEvent:Connect(function(partyOwner, partyName, MaxPlayers, partyId)
	local template = templates.PartyListPartTemplate:Clone()
	local partyIdValue = template.PartyId
	partyIdValue.Value = partyId
	template.Parent = elements.playMenu.PartiesHolder
	template.Visible = true
	template = template.Name.."_"..tostring(partyIdValue.Value)
	
	template.PartyName.Text = '"'..partyName..'"'
	template.MaxPlayers.Text = tostring(MaxPlayers)
	template.PartyOwner.Text = partyOwner.Name
end)

image

image
What is this? ANd how do i fix it

Did you mean to do partyService:GetCurrentPartyInfo()?

Suggestion: A parameter in Party:Create or Party:StartParty to turn off ShouldReserveServer.

Would be useful in my case.

When I try out the .rbxl file, it errors out when I click on Start after creating a party.

19:38:19.192 ServerScriptService.PartyServer:15: attempt to index nil with ‘Name’ - Server - PartyServer:15
19:38:19.192 Stack Begin - Studio
19:38:19.192 Script ‘ServerScriptService.PartyServer’, Line 15 - Studio - PartyServer:15
19:38:19.192 Stack End - Studio

Any ideas why

Im not sure I have left my project a long time ago. but it seems player is nil

nice, this is really useful for lobbies and such