Skip to content

PartyService:RemovePlayer()

CavaleiroDev edited this page Nov 7, 2022 · 1 revision

removes a player from a specific party

Info

PartyService:RemovePlayer(Player, Party)

Parameter Value Required What is Default
Player Instance (Player) True the player to be removed from a party
Party PartyTable True a valid PartyTable

Sample code

local PartyService = require(game.ReplicatedStorage.PartyService)
local event = game.ReplicatedStorage.RemovePlayer

event.OnServerEvent:Connect(function(localplayer, Player, Id)
	local Party = PartyService:GetPartyById(Id)
	if Party then
		PartyService:RemovePlayer(Player, Party)
	end
end)

Returns

Value What it does
Boolean true if the operation was successful, otherwise false
String a success or error message

Clone this wiki locally