Roblox has a function named, game.Players:GetPlayerFromCharacter()
Put this inside the touched function.
local player = game.Players:GetPlayerFromCharacter(hit.Parent) -- gets a player from their character
if player then -- YOU FOUND A PLAYER!
print("Got player.")
-- rest of code.
else
print("Did not hit player.")
return -- stops the code.
end