You can write your topic however you want, but you need to answer these questions:
What is the issue? It warns me about Infinite yield possible on :WaitForChild(“Humanoid”)
part.Touched:Connect(function(ot)
local char = ot.Parent
local Humanoid = ot:WaitForChild("Humanoid")
if Humanoid then
print("Humanoid found")
Humanoid:TakeDamage(math.random(1,100))
elseif not Humanoid then
print("Humanoid Not Found")
end
end)
It says infinite yield possible on :WaitForChild(“Humanoid”) for some reason. Could you guys help?
im not really a scripter but whenever the infinite yield possible thing appears on my output when scripting it really doesnt do anything, its just a reminder or something, so unless it says it in the error tab then i dont think it really matters
script.Parent.Touched:Connect(function(ot)
if ot.Parent:FindFirstChild(“Humanoid”) then
print(“Humanoid found”)
ot.Parent.Humanoid:TakeDamage(math.random(1,100))
elseif not ot.Parent.Humanoid then
print(“Humanoid Not Found”)
end
end)