Humanoid.PlatformStand disables respawning?

Im making a script which disables player movement using PlatformStand on the Humanoid, but when the player resets it doesnt respawn. Ive tried disabling PlatformStand when i die but even tho its disabled, i still dont respawn.

I know its my script that does it, disabled script allows me to respawn again.
Any help?

1 Like

try disabling platformstand when you die and then manually respawning the character with Player:LoadCharacter()

So i tried that, but idk where im supposed to put this script even? When i do it as a StarterPlayerScript it tells me LoadCharacter can only be done by backend. But when i do a ServerScriptService script i cant detect the CharacterAdded event…

im not really sure what you mean, if its a localscript that ur doing this in then you would need a regular Script inside of ServerScriptService and you can use a RemoteEvent to tell the server to respawn your character

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function()

	end)
end)


Why is this so complicated. Tried detecting death in a seperate ServerScript script, but it only detects CharacterAdded, not my death. I dont even know how i would do this with RemoteEvents, so i really dont want to unless 100% nessesary

That looks like it should work, is it not printing Dead at all?

It does not, no… Just filler text here

I really don’t know how to help you since that exact code is working perfectly fine for me

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		print("Char added")
		char:WaitForChild("Humanoid").Died:Connect(function()
			print("Char died")
		end)
	end)
end)

maybe make sure your RunContext is set to either Legacy or Server?

The only other thing that is different is that i have a custom PlayerCharacter but that shouldnt mess up being able to detect death right?
I will try switching RunContext

Still wont detect death…Very strange…Guess ill have to make a custom death script then? That somehow keeps a look at peoples Humanoid’s Health, and respawn the character whenever it reaches 0, would that work?

So i made a LocalScript that detects when the Humanoid health reaches 0, and i think im gonna send a RemoteEvent to the server to respawnt the Character.
But how would i make that safe?

If i am correct someone could hijack that event and respawn anyone at will, since i would just send a Player name through the event.

Not the guy that was helping you here, but they cannot abuse it in any way if you just use the .OnServerEvent first parameter which cannot be changed by exploiters and always tells which player sent the remote.

ClientDeath.OnServerEvent:Connect(function(Player)
   task.wait(game.Players.RespawnTime);
   Player:LoadCharacter();
end);

Ahhh alright, nice! Thank you for the answer!

Hey! I think I found a fix for this, i was also having the problem. When a Player dies, the Humanoid’s State changes to “Dead” HumanoidStateType, BUT FOR SOME REASON when PlatformStand gets activated (which makes the state change to PlatformStanding) too fast (atleast before the humanoid’s state gets changed to Dead), the Humanoid’s state wont change, which causes the player to Heal even after dead, and (atleast for me) makes the character NOT respawn. To fix this, i added a check that checks if the humanoid’s health is greater than 0, and if it is, activate PlatformStand (and change state to physics, if you use a RagdollSystem).

If you NEED PlatformStand to be active even after death, you could do this:

task.spawn(function()

local old, new = Humanoid.StateChanged:Wait()
if new == Dead State then
– perform actions
end
end)

I think it lags the character/game tho if you actvate PlatformStand or change state to physics, but im not sure.