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.
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)
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
I havenât used the module but I plan on using it and the module looks great Question : does it stop people in your party from attacking you ?
No you have to implement it by yourself but it literally takes 5 lines
Ooh I didnât know but I guess it shouldnât be hard to implement it
How to get RandomParty code
like i cant seem to know how to get the random invite id code data
i dont know if you are still having this problem but this line of code should get the code data:
PartyTable.InviteCode
the PartyTable is the value returned from the PartyService:Create()
function
So theres a PartyService:TeleportToLobby()
function, but how can i send back data to the lobby from the Party Server?
Hi, is it possible to see the published project with this module with a working gui? it would be wonderful to have such a project to edit in studio