Ok, before you close this thread Feahren, I tried to make this work but it didn't. The event on line 18 isn't firing, no errors are shown. Thanks!
game.ReplicatedStorage.WaitingTeam.OnServerEvent:Connect(function(plr)
local piwt = {}
local pig = {}
table.insert(piwt,plr)
if #piwt == 1 then
for i, v in pairs(piwt) do
table.insert(pig,v)
end
for i, v in pairs(pig) do
if v == plr.Name then
local roles = {"Werewolf","Seer","Archer","Cupid","Banana Doctor","Villager","Bodyguard"}
for i, v in pairs(roles) do
local role = math.random(1,#roles)
table.remove(roles,table.find(roles,role))
game.ReplicatedStorage.GameBegins:FireClient(role)
end
end
end
end
game.Players.PlayerRemoving:Connect(function(p)
for i, v in pairs(piwt) do
if v == p then
table.remove(piwt,i)
end
end
for i, v in pairs(pig) do
if v == p then
table.remove(pig,i)
end
end
end)

4 comments
oh, I thought I only had to put the first argument on the receiving end
It still doesn't fire tho
If it is not firing, it is scope is not being reached; ensure all conditionals pass, or nothing is proving false to interrupt the scope responsible for calling the RemoteEvent
This is not an issue with my fix.