Respawntime is acting wierd

I have a little problem.


So as you can see, I have to respawn time set to 10 and it just acts really weird. Its also somehow local because my friends joined and they have the same thing. I have no idea why this is how it is. Any help would be really appreciated.

You can send a script to ServerScriptService and then connect to LocalPlayers and do RespawnTime = 10 from there. And your game looks like a toolbox. Look at some scripts. Is there anything related to respawn?(also try with script.Maybe it’s set in scripts.)

Hmmmm . . . i added this script:

local Players = game:GetService("Players")

local RESPAWN_DELAY = 10

Players.CharacterAutoLoads = false

local function onPlayerAdded(player)
	local function onCharacterAdded(character)
		local humanoid = character:WaitForChild("Humanoid")

		local function onDied()
			task.wait(RESPAWN_DELAY)
			player:LoadCharacter()
		end

		humanoid.Died:Connect(onDied)
	end

	player.CharacterAdded:Connect(onCharacterAdded)

	player:LoadCharacter()
end

Players.PlayerAdded:Connect(onPlayerAdded)

And this is what happened


also wdym it looks like a toolbox?

Do you have any other scripts that use LoadCharacter()?

For reference, btw, do this:

  1. Press Ctrl + Shift + F to open the global Find All
  2. Type :LoadCharacter()
  3. Look through results, though ignore the script you just added, obviously.
1 Like

Make sure your character doesn’t have PlatformStand set to true and BreakJointsOnDeath set to false at the same time of the death, or else the humanoid state won’t replicate to the client.

Just a note: This is irrelevant, since the Humanoid is being killed on the client and the Humanoid’s properties do not dictate what happens when the Character property is changed to something else (in this case, a new Character.)

1 Like

yeah, i have but those are on certain NPCs. The script i made is the only one that i could find that uses LoadCharacter()
image_2022-11-07_101045364

Sorry, went out for a bit; can you show me the code the NPCs use? They look to be part of the reason, as LoadCharacter is the only thing I can think of that produces this behavior.

1 Like

Your right. I put it into a baseplate, same thing happened. Thank you so much for your help. I actually am amazed.

I was referring to the character’s humanoid and a recent bug report about this.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.