Problems with kill bricks not instantly killing -

Hi! So currently I am messing around with kill bricks, and I’ve tried a couple different ways to kill the player. But the ones I’ve tried, you can jump on, and if you keep jumping, you don’t die?

I have tried multiple scripts now, but on the ones I’ve tried, you are able to jump on them without dying. If you hold down the jump bar it doesn’t activate the kill script. What should I do?

Here is my script. (I have it set up so the parts in a certain folder all are kill parts)

local folder = workspace.KillBricks

for _,v in pairs(folder:GetChildren()) do
	if v:IsA('BasePart') then
		v.Touched:Connect(function(touched)
			local possibleHumanoid = touched.Parent:FindFirstChildWhichIsA('Humanoid')
			if possibleHumanoid then
				possibleHumanoid.Health = 0
			end
		end)
	end
end

This is an issue with roblox itself and how r15 works, you should wrap the kill brick with an uncollideable part and put the script in that one instead

You could try detecting touch on the client because server-side collision detection sucks

How would I detect it on the client?

How should I do this? I don’t want to make the brick a lot bigger then the part that is showing, but if it is too small it just does the same thing.

If you don’t want the hitbox to be bigger you can make the actual brick smaller and the uncollidable part as big as the brick, but if you can you should make the whole brick uncollidable

Something like this

local Players = game:GetService('Players')

local LocalPlayer = Players.LocalPlayer
local folder = workspace:WaitForChild('KillBricks')

for _,v in pairs(folder:GetChildren()) do
	if v:IsA('BasePart') then
		v.Touched:Connect(function(touched)
			local character = touched.Parent
			local player = Players:GetPlayerFromCharacter(character)
			if player and player == LocalPlayer then
				local possibleHumanoid = character:FindFirstChildWhichIsA('Humanoid')
				if possibleHumanoid then
					possibleHumanoid.Health = 0
				end
			end
		end)
	end
end

Ah, yes this works better, I can just turn off can collide and they can’t jump

I already found a solution, but I’ll try this one and see if it works, thanks!