I’m having trouble with a killbrick script where players can BHop and not die it works if you were to walk on it or even fall on it but if you constantly jump on it you will not die if anyone has any suggestions or input I would be delighted to hear! ( I don’t script on the regular I usually build so i’m just a script kiddie!)
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)
Thank you!
1 Like
I suspect this is to do with Roblox not registering Touched events if someone is in the jumping state (I’m probably wrong here, but Touched isn’t a reliable way to figure out this information anyway).
Perhaps detecting the user jumping on the part with another way (For example, Region3s?) is a solution. It really depends on your skill level though. It’s unfortunately not a trivial fix
1 Like
I don’t see any problem with the code, at all.
The only problem I see that :connect()
is deprecated and you’re still using it.
You should use :Connect()
instead of :connect()
. It can stop working suddenly.
Hope this helped! Have a good day/night.
This is a problem with humanoids, when you keep jumping the character doesn’t touch the floor at all so the touch event is not fired, a solution is to make an invisible part slightly bigger than the original and make its collision to false and make that act as a killbrick and keep the other part just as the display.
4 Likes