I'm trying to make a gomba but I got an error. It says "Touched is not a valid member of script." Heres the script:
for key, object in pairs(script.Parent:GetChildren()) do if object:IsA("Part") or object:IsA("MeshPart") then end object.Touched:Connect(damage) --Where I recieved the error.
end