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

Is there a way of making a reliable kill brick?

In an actual server, sometimes the touched event doesn't seem to fire when a player holds down the jump button. A basic kill brick would look like this in a server script inside of the kill brick,

script.Parent.Touched:connect(function(part)
	if not part.Parent:FindFirstChild("Humanoid") then return end
	script.Parent:BreakJoints()
end)

The above works however, when a player jumps on the brick very fast on an online game the brick will not kill the player. Is there any other way of killing a player reliably on an server, a laggy one?

I would like to only use one brick, with on script. However, if this is not possible, feel free to tell me.

Thank you.

3 comments

0

I have a idea. you Dont have To Script a Brick for someone to die! Just follow the steps.

0

you can just make a part, make it red, make it so that it cannot collide, and put it in the middile of some anchored bricks.

0

and then you anchor the lava/kill brick

2 answers

yes but the roblox obby template the kill bricks have the insta death no chance heres the script for it

script.Parent.Touched:connect(function(hit)
	if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
		hit.Parent.Humanoid.Health = 0
	end
end)

2 comments

0

I don't really understand your English. I also must say, this is almost the same as my script and would function about the same. The problem I was having is the Touched Event not firing.

0

Always use :GetPlayerFromCharacter before detecting the humanoid.

A quite reliable way, is adding an invisible non-collidable AREA block, above the kill brick, about 0.5 to 3 studs high, and adding the script to that block instead. By doing this, the player can NOT jump away from the block, as they are already INSIDE it!

1 comment

0

Using 2 bricks because it is 10x more reliable. If you only use 1 to make it less messy, you can add the kill brick into the "fake kill brick".

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