So here's the deal. I've been following this tutorial: https://www.youtube.com/watch?v=u9-U2aX3osQ&t=45s and as part of it I created a script that is supposed to register register a player as a winner when they touch a brick (named "End"). However, when my player touches the brick, nothing happens. The touch is registered (I get the "I've been touched" print) but as far as I can tell it doesn't work once I hit the "if" statement. "we have a winner" never prints. Minigame.End.Touched:connect(function (hit) is where the problem appears to begin:
Minigame = script.Parent
Functions = require(script.Functions)
Minigame.End.Touched:connect(function (hit)
print("I've been touched")
local hum = hit.Parent:FindFirstChild("humanoid")
if hum then
local player = game.Players:GetPlayerFromCharacter(hum.Parent)
if player then
Functions:AddWinner(player)
print("we have a winner")
end
end
end)
for i = Minigame.Minigameinfo.Time.Value, 1, -1 do
if i == 1 then
_G.Msg("The minigame will end in "..tostring(i).." second.")
else
_G.Msg("The minigame will end in "..tostring(i).." seconds.")
end
if #Minigame.Minigameinfo.TempContestants:GetChildren() <= 0 then
break
end
wait(1)
end
Minigame.Minigameinfo.Finished.Value = true
I've completed the tutorial and double-checked all scripts among other things and still can't figure out what needs to be fixed. I get no errors in the output either. How do I get this to work?

6 comments
It is Connect, not connect. And Humanoid, not humanoid.
Make sure you spell Humanoid with a uppercase H
Hey dude! There are people who have answered your question! You need to accept one of their answers!
We don't know if that fixed his problem
FindFirstChild() is case sensitive, meaning that one opposite case character in a given name/string makes all the difference. You'll have to capitalize 'humanoid' to make it work (assuming that the humanoid is actually named Humanoid).
Sorry for keeping you all in suspense, changing "humanoid" to "Humanoid" solved the problem. Thanks for pointing out my rookie mistake!