Here is the code, I'm not sure if I need to add debounce to it, or what the problem is. When I use it on a custom model when I spawn in I die instantly, and then I respawn, die. Continuously. When used with a dummy model from animation editor, I spawn in the middle of the map, not my spawn point, and am stuck in the air, unable to move. Any advice would be greatly appreciated. Here is the code:
local char = game.ServerStorage.CustomCharacter -- The character to load local respawnTime = 2.5 -- How many seconds the player remains dead before they respawn game.Players.CharacterAutoLoads = false -- Disable default character loading function playerAdded(player) if player.Character and player.Character.Parent then -- Destroy an already-existing character player.Character:Destroy() end while player.Parent do -- Repeat until they leave the game loadChar(player) -- Method waits until they die wait(respawnTime) end end function loadChar(player) local char = char:clone() char.Name = player.Name local humanoid for i, child in pairs(char:GetChildren()) do -- Find the humanoid if child.ClassName == "Humanoid" then humanoid = child break end end if not humanoid then -- If no humanoid was found, make one humanoid = Instance.new("Humanoid", char) end player.Character = char char.Parent = game.Workspace humanoid.Died:wait() -- Wait until they die end game.Players.PlayerAdded:connect(playerAdded) for i, player in pairs(game.Players:GetPlayers()) do -- Play Solo support if player.Character then player.Character:Destroy() end playerAdded(player) end