#I take damage without touching the damage block

1 messages · Page 1 of 1 (latest)

obtuse sundial
#

any help?

#

local coffeeBlock = script.Parent
local Players = game:GetService("Players")
local cooldowns = {} -- debounce per player

coffeeBlock.Touched:Connect(function(hit)
local character = hit.Parent
local player = Players:GetPlayerFromCharacter(character)
local humanoid = character and character:FindFirstChildOfClass("Humanoid")

if humanoid and player then
    if cooldowns[player] then return end -- prevent rapid hits
    cooldowns[player] = true

    -- Damage amount
    humanoid:TakeDamage(20) -- reduces 20 HP (max is 100)

    -- Cooldown before the same player can be damaged again
    task.delay(0.5, function()
        cooldowns[player] = nil
    end)
end

end)

abstract wraith
#

you have latge hitbox maybe

obtuse sundial
#

wht should i perchance do

fierce gulch
#

prob big hitbox tbh

#

but 10/10 code

sand swan
#

accessories with CanTouch on maybe?

safe brook
#

Meshpart with wonky hitboxes

#

Roblox is bad at calculating how things should interact with meshparts, and it often makes it so their hitboxes are misshapen and larger than they should be

sand swan
#

Yeah and sometimes the hit box is a square part when the mesh is round