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!
I think it's not printing as you say "hit.Parent.Name" which I think is the workspace.
To fix this, instead of putting hit.Parent.Name, say hit.Name in each of them.