How to get someones username when a part is touched #help-and-feedback:scripting-support

I just need to know how to get someones username when a part is touched

part.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		local username = player.Name
		print(username)
	end
end)