Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you kill someone so when they die they lose their Humiod?

Some games of things where you kill some one then they lose thier Humiod. What I am basiclly saying is when you kill someone, they go on the floor instead of their body blows. And thier body stays there.

3 answers

You can make your own custom function that uses the LoadCharacter method.

function kill(player, timer)
	if player.Character and player.Character:FindFirstChild("Humanoid") then
		player.Character.Humanoid:Destroy()
	end
	Delay(timer or 5, function() --Respawn timer, default time is 5 seconds
		player:LoadCharacter()
	end)
end

--How it's used
kill(game.Players.Roboy5857, 4) --Kills Roboy5857 and waits 4 seconds before respawning his character

If you don't input anything for timer (where the number 4 is) then, by default, it will take 5 seconds before the character respawns.

Well, they do that by turning off AutoCharacterLoading in the game. They then have a script that, when the player dies, instead of the character following the traditional "dieing," the character actually welds together (and Un anchors.)

There are scripts like that all over free models, I would look some up for reference (but try to re-script it, or customize it, so you are not just using someone else's work.)

This discussion is preserved as it was. New answers, comments, and votes are closed.