Jump to content

Custom components OnLoad not working and other problems.


Recommended Posts

Pretty self-explanatory. I created a custom component, added some variables and functions. The problem comes with saving these variables. The OnSave function works (I'm checking it with print("OnSave works!")). The OnLoad function on the other hand is not working and I have no idea why.
Here's my component:
 

sickness.lua

 

EDIT

So I still have that problem with the OnLoad function not working, but now in addition to this I can't seem to make my prefab listen to the "oneat" event. I've looked through many files, all using inst:ListenForEvent("oneat"), and they seem to work. Mine for some reason isn't working.

Any help would be great.

Edited by IThatGuyI
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...