What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Using the Touched event, but you can bypass that with jumping.
This is the code I use to “kill” the player
local module = require(game.ServerScriptService.PlayerRevivalScript.Module)
local debounce = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
if debounce == false then
debounce = true
-- The next line basically "kills" the player
module.reset(game.Players:FindFirstChild(hit.Parent.Name))
wait(.25)
debounce = false
end
end
end)
EDIT: Here’s the relevant part of the module
local module = {}
function module.teleportToCheckpoint(plr)
plr.Character:WaitForChild("HumanoidRootPart")
plr.Character.HumanoidRootPart.Position = plr:FindFirstChild("vars").lastCheckpoint.Value.Position + Vector3.new(0, 8, 0)
end
--[[ The only relevant part in module.reset(plr) is it calling
the module.teleportToCheckpoint(plr) function,
so I'm leaving module.reset(plr) out ]]--
return module
Do you mean that you can survive the kill bricks by holding the jump button?
The solution is to turn off CanCollide on the kill bricks. The default character controller has a bug where it can jump before landing instead of after landing. It’s been like this for as long as I can remember.
If you don’t think having CanCollide off looks right, you can make invisible kill bricks w/o CanCollide that surround your “visual” kill bricks but are a little bit taller.
Mm I don’t recommend using this since there is quite a big change it’ll be “fixed” later.
Instead you can probably use a humanoid.jumped:wait() event to check if the player jumped right after
It’s been like this for as long as I can remember, even way before R15 came out. But it may have gotten worse with R15.
A different (and IMO better) thing you can try is to weld an invisible, massless, non-cancollide part to the HumanoidRootPart just under where the character’s feet are, and use that as a additional detector to see when they land on something.
You can do that like so:
function give_character_foot_hitbox(character)
--Remove old foot hitboxes so characters don't end up with more than 1
remove_character_foot_hitbox(character)
--Setup a new foot hitbox
local root_rig_att = character:FindFirstChild("RootRigAttachment", true)
local hitbox = script.FootHitbox:Clone()
hitbox.CFrame = root_rig_att.WorldCFrame * CFrame.new(0, -character.Humanoid.HipHeight, 0)
hitbox.Weld.Part1 = character.PrimaryPart
hitbox.Parent = character
end
function remove_character_foot_hitbox(character)
local hitbox = character:FindFirstChild("FootHitbox")
if hitbox then
hitbox:Destroy()
end
end
script.GiveFootHitbox.Event:Connect(give_character_foot_hitbox)
script.RemoveFootHitbox.Event:Connect(remove_character_foot_hitbox)
Here’s a place file that uses this so you can test it out: FootHitboxTest.rbxl (27.4 KB)