Hey! I’m creating an obby type game with user made obbies and rounds, and I have a little problem . . .
The kill script in the parts aren’t as sensitive as they need to be; hence, players can hold down jump and not get killed by the bricks, anyway to fix this?
local Brick = script.Parent
local function PlayerTouched(Part)
local Parent = Part.Parent
if game.Players:GetPlayerFromCharacter(Parent) then
Parent.Humanoid.Health = 0
end
end
Brick.Touched:connect(PlayerTouched)
This is typically a problem with R15 hitboxes. What you can try is creating a brick below the HumanoidRootPart that serves as a “touch detector” of sorts. Instead of checking if the player touches a brick, check if this detector touches a kill brick. If so, kill the player.
I’m pretty sure he’s saying that the killbrick works, its just that its DeLAyEd since the R15 Character has a different hitbox causing some problems. To fix this, you would most likely have to change the hitbox. @colbert2677 suggested a nice idea which is to attach a brick to the HumanoidRootPart Below and using that to detect touches instead. As @REALTimothy0812 also mentioned, the animation also plays the part of making this annoying. If you want though, you could try changing the jump and fall animation but that would be unreliable in some cases since it could still happen.
A more easy way too is to make the killbrick cancolide off. That way, the character goes into the killbrick effectivley killing it. If that doesnt work, you can try extending an invisible killbrick up a little more with cancolide off but I don’t recommend this since it could make it really weird.
Attach a weld part under the root and use this to check for touch detections. Relying on the R15 hitbox will give you the delayed issue you’re facing and animations may cause users to die, which in turn also equates to bad UX (users will complain about dying unreasonably).
@3rdhoan123 Setting the CanCollide of a brick to false won’t change the delay effect necessarily, the hitboxes still serve as an issue. Changing the size of bricks also may not fit with what OP wants.
Whether or not there really is a delaying issue, you should look into @colbert2677’s advice. I just did a test of my own, and on an empty baseplate (aside from two kill blocks) I experience an issue with R15 where I can repeatedly jump on both of the blocks. One block is a standard kill block, the other one uses the Touched event of humanoids.
You will either need to restrict your game to R6 only, or do what colbert said.
If it’s working but delayed it’s not a matter of sensitivity, but latency. You could handle it (at least partially) locally if you want lower latency (since there would be no network communication to initiate the death).