So i got a global death script for my minigame so when a player dies that he wont be in the Game anymore ( like registered ) so the game says "the blabla won" it did all work but now it says that :
Workspace.Globaldeath:5: bad argument #1 to 'Connect' (RBXScriptSignal expected, got function)
here is the script
game:GetService("Players").PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:waitForChild("Humanoid").Died.connect(function()
local Update = {}
for i,v in pairs(_G.gameplayers) do
if v ~= player.Name then
table.insert(Update,1,v)
end
end
_G.gameplayers = Update
end)
end)
end)
and how can i add that if a player dies he goes into the team "Medium stone grey" ? :) ty

4 comments
What is gameplayers also why are you trying to iterate through a function...
I got it from the youtuber alvinblox.. Dont understand it ether. and gameplayers are the players who are in the minigame playing
Just edited to remove the extra ~
I dont know what u mean. I just want to get rid off the Error and i need a fix code thanks