script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
print("touched by a humanoid")
end
end)
This is a server script, parented to a part in the workspace and i dont understand why this isnt working. At first i thought it may be because of the condition in the if statement but i dont understand why it can be wrong
Any help is apriciated

1 comment
i copy&pasted the script into my studio and it works fine