This only works if my character has the football and touches the part, and it will say, "Field goal is good", but it doesn't work when the football is thrown at the part. I want it to where if the football hits the part it says Field goal is good instead of having to get my character to touch it.
name = "Football"
debounce = false
msg = Instance.new("Hint")
msg.Text = "Field Goal Is GOOD!"
function onTouched(hit)
if (debounce==false) and (hit.Parent.Name==name) then
debounce = true
msg.Parent = game.Workspace
wait(5)
msg.Parent = nil
debounce = false
end
end
script.Parent.Touched:connect(onTouched)

3 comments
I agree with your answer, but it seems that hit.Parent and hit have the same name (on line 11 in your script).
its because when he throws the ball at the field goal hit.Parent wouldnt be named "Football" but if the player is holding it then hit.Parent is "Football", hence the if or statement
So I tried what you gave me but this time the messaged didn't even show up even tho I threw the football and touched it