How to use .Hit to detect if the explosion hit a humanoid

What would be the way to detect if the explosion killed a player? I have a bomb in my game, and I have the part where if .hit is activated it gives them a kill and cash leaderstat, but that’s for any part, how would I limit that down to a humanoid

You could do hit.Parent which would return the Character of a hit part (assuming it hit a character’s bodypart). Then you could check if that Character has a humanoid inside with Character:FindFirstChildOfClass'Humanoid'. You could also do Players:GetPlayerFromCharacter(Character) to check if that character belongs to a player.

3 Likes

ok! ill check this out next time I hop on studio, seems like it would work though

1 Like