What I mean is like saying, if a part is somewhere, and it touches a other part, it does the function to that part, and not the players.
My guess is that it goes something like this :
function onTouch(touched) if script.Parent.Touched:connect ~= humanoid then end if script.Parent.Touched:connect == humanoid then end end script.Parent.Touched:connect(onTouched)
The way you worded it is a bit confusing. Let me get this right. If you're trying to make the code run, if the object that touched a part is NOT a player, then here you go:
script.Parent.Touched:connect(function(hit) if not game.Players:GetPlayeFromCharacter(hit.Parent) then -- Your code end end)
If you want it to run if it's a player, remove the "not" in line 2!