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
What i guess is you have to say that humanoid is EQUAL to hit so if thats the case then
if humanoid == hit then print("A humanoid touched the part")