The Purpose Of This Script is to detect if a part (The Part Is The Parent Of The Script) touches another part named "SauceDetector". The Part "SauceDetector" is an unanchored, can collide off part the falls from right above the Part and touches the part. For some reason the Print("SauceDetected") Doesn't Print.
function onTouched(hit)
if hit.Parent.Name == "SauceDetector" then
print("SauceDetected")
script.Parent.Sauce.Value = true
end
if hit.Parent.Name == "CheeseDetector" then
script.Parent.Cheese.Value = true
end
if hit.Parent.Name == "PepperoniDetector" then
script.Parent.Pepperoni.Value = true
end
if hit.Parent.Name == "MushroomDetector" then
script.Parent.Mushroom.Value = true
end
end
script.Parent.Touched:connect(onTouched)
If You Know Why Its Not Detecting Please Let Me Know!

6 comments
Hit.Parent.Name should return the Handle of your Character; username
So you're correct, he's asking if the Username is equal to "SauceDetector", which will never be true, unless someone is that random
@Ihatecars100, I tried changing hit.Parent.Name to hit.Name and it didn't work :/ Also @simplealgorithm, I'm trying to Print("SauceDetector") if the Part touches a Part Named SauceDetector, Not A Player.
@kizi3000 maybe try changing :connect() to :Connect()?
still doesn't work :/
are you definitely sure the part that's hitting is called "SauceDetector?"