ok so i am just reseting every player in the game i have referenced the wiki and past questions but it still doesnt work and my game still crashes to go with it any help?
here is my code
function eF() wait(5) for j, k in pairs(game.Players:GetPlayers()) do local c = game.Workspace:FindFirstChild(k.Name) if c then print (c) c:BreakJoints() end end survivorList = {} infectedList = {} iR = false infected = nil wait(1) serverCheck() end
The :BreakJoints() function can ONLY be used on Parts or UnionOperations; Objects with Welds. Thus I'd propose you to break the joints of a part of the player that is needed for surviving.
function eF() wait(5) for j, k in pairs(game.Players:GetPlayers()) do local c = k.Character -- The Character is a variable of the Player which is related to the player's character. if c then print (c) c.Torso:BreakJoints() -- The Torso is needed for surviving and a Part with Welds. end end survivorList = {} infectedList = {} iR = false infected = nil wait(1) serverCheck() end