Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-2

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

Asked by 10 years ago

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

Log in to vote
2
Answered by
nate890 495 Moderation Voter
10 years ago

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.

Ad
Log in to vote
0
Answered by 10 years ago

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.)

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago

I think you're talking about a rag-doll script, look for it in free models.

http://www.roblox.com/catalog/browse.aspx?Keyword=ragdoll%20script&SortType=0&SortAggregation=3&SortCurrency=0&LegendExpanded=true&Category=1

Answer this question