Kamehame, trouble with Touched function

So I made a kamehame script, only problem is the hitbox method I used for it (Touched) is yet to be reliable. The beam itself is anchored, and changes in size + cframe as it iterates through a loop. So how doesn’t this method work? It doesn’t work at all when it goes through dummies, or players that stand completely still.

Care to show a gif, show code, anything other than words with nothing to show?

1 Like

Can you send the script? I can’t work off of just words.

1 Like

Since Touched is unreliable couldn’t you just use region3 to make a box around the part which is meant to hit the target and then use workspace:FindPartInIgnoreList to check if it hits somebody and to prevent it from damaging the local player.

Touched is unreliable for most parts… using it for a kamehameha not so much(unless you feel like dealing with the headache known as region3) a lot can happen with region3 your box can be to big it can hit something else before the player, etc. Your best bet would be to raycast account for players and parts/unions. Raycasting also means you can easily make a blast effect when it hits someone. I’ve been playing around with dragon ball since mastrj made his game free to everyone and one thing I found out is raycasting is your best friend. For efficiency and aesthetically.

@KnockOfScripting I’ll take note on the raycasting part, but you said touched is useful for kamehameha scripts? That’s really weird because for my script it just simply goes right through the player, if they’re moving then it’s fine, but if they aren’t then it doesn’t detect them at all.

Have you found a suitable detection to use for kamehemha moves?

local touchingParts = kame:GetTouchingParts()
local function findPlayer()
    for _, part in pairs(touchingParts) do
        local ch = part.Parent
        local hum = ch:FindFirstChild("Humanoid")
        local player = game.Players:GetPlayerFromCharacter(ch)
        if hum and player then
            hum:TakeDamage(70)
            kame:Destroy()
        end        
    end
end
findPlayer()
1 Like