First of all, make sure you haven't disabled acpid.
The script may be running, even though pressing the button appears to do nothing. Different distributions probably do different things, but on ubuntu it will generally pass responsibility to gnome or kde. You can just change the script to skip the gnome/kde stuff and shutdown directly.
If you do that and it still doesn't shutdown, check /etc/acpi/events/powerbtn. You should see
action=/etc/acpi/powerbtn.sh
listed in there. That's how it knows which script to run when you press the button. If it's not there, put it at the bottom and try again.