Jump to content

Codeing, loop help?


Whix

Recommended Posts

Hello i'm trying to add the following into a loop

inst:ListenForEvent("rainstart", function()

 

end, GetWorld())

 

I am not sure if i am going about this correctly but basically what i want is to for example, while rain is on such and such happens to this character else something else happens. Not sure on how to do it, i have tried a couple of ways, but i am not even sure if i should be using an if statement instead of a while one. (Also i am putting the line of code into the "local fn = function(inst)" of my characters script). But in the end i want it to constantly be checking for if there is rain and if so do whatever i specify it to do (i have had it done before without the loop but since it wasn't a loop it didn't reset itself)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...