All module threads end after player respawn

Whenever I respawn in my game, a module I use for dialogue (located in ReplicatedStorage, used on client) has all of it’s threads killed. This causes the current dialogue to stop working, i need it to keep working because i’m making a tutorial that you (most likely) will die in.

Is this normal for modules while using them on the client? should I just use a localscript?

Thanks.

where is local script located, and please attach code (not module code, local script code u use to require module)

It’s located in UI in startergui, the ui has resetonspawn off, i cant provide the module right now but I can later.

If you do not want those threads to be killed then consider moving the module somewhere (rep storage) where it won’t get destroyed when the player dies

the module is actually located in replicatedstorage, thats whats confusing me

After some research I realised that when the player dies the module script the client is requiring has its functions reset (client side stuff). So you should just have to dialogue logic on the local script to prevent this

1 Like

Thank you! appreciate your time.

i think the local script where you call the function of the module is the reason of the reset if the localscript resets after die the function that the localscript called ends but if the localscript doesnt it wont end

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