Script isnt working

At the moment, I am trying to understand module scripts, and I was messing around with bindable events. This script is just not working… :frowning: I’ve searched up and tried to find answers, asked ChatGPT, which says that the script should be working, and have honestly found nothing.

Thanks in advance.

Show the whole module script, also as of now I don’t see any bindable events as a children of module script.

You are connecting the event after the module finishes running, you can see the issue by looking at the order of the prints. Try to change function changehealth to function HealthModule:changehealth (don’t try to run it in the module) and return it normally. Now you can run it in a script that requires it like this (put at the end of the script or after bindable event connection):

HealthModule:changehealth(20)

It should print now

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.