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

An instant kill script (no delay)?

Asked by 4 years ago

I am trying to make a game similar to 100 stages where whenever you touch a block in a server (NOT Roblox Studio) you immediately die instead of there being a delay/ping can anybody help me out?

0
First of all, this isn't a request site; however I will provide some help. Have a script inside the block, and when its touched have it check if its a player, then inflict damage on their humanoid. Stephenthefox 94 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

Like Stephen already noted, yes, we will only help you fix your problem. We won't write the full scripts for you outright.

Anyway, regardless of that some info still. What Stephen noted is correct and you have to check whether the given Touched part is a humanoid first. However to make an instant kill I would not advise to remove health from the humanoid.

When you lower the health of the user (even with 100% of the health) there is the offchance the Health script of a player will execute in the same tick, healing them again and will not cause them to die.

If you want a guaranteed kill on a player I always snap the joint between the Head and the Torso (the Neck). If the Head gets deattached from the body it's a guaranteed kill.

Ad
Log in to vote
0
Answered by
karlo_tr10 1233 Moderation Voter
4 years ago

Flowery gave you good solution also if you want everything to be quicker you could make character loads as soon as they die, something along with this lines:

game:GetService('Players').PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        character:WaitForChild("Humanoid").Died:Connect(function()
            player:LoadCharacter()
        end)
    end)
end)

Of this should be Normal script insde workspace or ServerScriptService

Answer this question