if game.Players:GetPlayerFromCharacter(hit.Parent) then
So this means that if the player has a humanoid then continue Right??
Basically yeah.
if game.Players:GetPlayerFromCharacter(hit.Parent) then end
The code will check if the parent of what hit it is a character/player.